NEST main@caf0ae8
 
Loading...
Searching...
No Matches
sort.h File Reference
#include <algorithm>
#include <cstddef>
#include <vector>
#include "config.h"
#include "block_vector.h"
Include dependency graph for sort.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  nest
 Namespace for the NEST simulation kernel.
 

Macros

#define INSERTION_SORT_CUTOFF   10
 

Functions

template<typename T >
size_t nest::median3_ (const BlockVector< T > &vec, const size_t i, const size_t j, const size_t k)
 Calculates the median of three elements.
 
template<typename T1 , typename T2 >
void nest::insertion_sort (BlockVector< T1 > &vec_sort, BlockVector< T2 > &vec_perm, const size_t lo, const size_t hi)
 Insertion sort, adapted from Sedgewick & Wayne (2011), Algorithms 4th edition, p251ff.
 
template<typename T1 , typename T2 >
void nest::quicksort3way (BlockVector< T1 > &vec_sort, BlockVector< T2 > &vec_perm, const size_t lo, const size_t hi)
 Quicksort with 3-way partitioning, adapted from Sedgewick & Wayne (2011), Algorithms 4th edition, p296ff (see http://algs4.cs.princeton.edu/23quicksort/QuickX.java.html).
 
template<typename T1 , typename T2 >
void nest::sort (BlockVector< T1 > &vec_sort, BlockVector< T2 > &vec_perm)
 Sorts two vectors according to elements in first vector.
 

Macro Definition Documentation

◆ INSERTION_SORT_CUTOFF

#define INSERTION_SORT_CUTOFF   10