36#ifdef OGDF_SYSTEM_UNIX
40#ifdef OGDF_FME_KERNEL_USE_SSE
45namespace fast_multipole_embedder {
57#ifdef OGDF_FME_KERNEL_USE_SSE
58 std::cout <<
"OGDF_FME_KERNEL_USE_SSE" << std::endl;
60#ifdef OGDF_FME_PARALLEL_QUADTREE_SORT
61 std::cout <<
"OGDF_FME_PARALLEL_QUADTREE_SORT" << std::endl;
63#ifdef OGDF_FME_KERNEL_USE_SSE_DIRECT
64 std::cout <<
"OGDF_FME_KERNEL_USE_SSE_DIRECT" << std::endl;
78 return (T*)(((
size_t)((
void*)
t)) & ~0x0F);
83 return (T*)((((
size_t)((
void*)
t)) + 15) & ~0x0F);
86#ifdef OGDF_SYSTEM_UNIX
93 diff.tv_sec =
now.tv_sec -
then.tv_sec;
94 diff.tv_usec =
now.tv_usec -
then.tv_usec;
95 while (diff.tv_usec < 0) {
97 diff.tv_usec = 1000000 +
now.tv_usec -
then.tv_usec;
108 std::cout <<
t <<
"s\t" << text << std::endl;
112 std::cout <<
t <<
"s\t" << text <<
"\t" << (
t /
sum) * 100.0 <<
"%" << std::endl;
116#define OGDF_MALLOC_16(s) System::alignedMemoryAlloc16((s))
119#define OGDF_FREE_16(ptr) System::alignedMemoryFree((ptr))
122template<
typename MNR_T,
typename C_T>
127 const unsigned int BIT_LENGTH =
static_cast<unsigned int>(
sizeof(
MNR_T)) << 3;
132 for (
unsigned int i = (
BIT_LENGTH >> 1); i > 0; i = i >> 1) {
135 x = (x | (x << i)) &
mask;
136 y = (y | (y << i)) &
mask;
142template<
typename MNR_T,
typename C_T>
145 unsigned int BIT_LENGTH =
static_cast<unsigned int>(
sizeof(
C_T)) << 3;
150 for (
unsigned int i = 0; i <
BIT_LENGTH; i++) {
176 return 0x1 << (
msb - 1);
249 for (
int j = 1;
j < m;
j++) {
253 for (
int i = 1; i < n; i++) {
257 for (
int j = 1;
j < m;
j++) {
292 for (i = 0; i <=
m_max_n; i++) {
297 for (i = 0; i <=
m_max_n; i++) {
301 for (i = 2; i <=
m_max_n; i++) {
302 for (
j = 1;
j < i;
j++) {
311 for (i = 0; i <=
m_max_n; i++) {
439template<
typename FunctionType,
typename ArgType1,
typename ArgType2,
typename ArgType3,
typename ArgType4>
457template<
typename FunctionType,
typename ArgType1,
typename ArgType2,
typename ArgType3>
474template<
typename FunctionType,
typename ArgType1,
typename ArgType2>
490template<
typename FunctionType,
typename ArgType1>
504template<
typename FunctionType>
550template<
typename FunctionType,
typename ArgType1,
typename ArgType2,
typename ArgType3,
typename ArgType4>
557template<
typename FunctionType,
typename ArgType1,
typename ArgType2,
typename ArgType3>
563template<
typename FunctionType,
typename ArgType1,
typename ArgType2>
569template<
typename FunctionType,
typename ArgType1>
574template<
typename FunctionType>
Declaration of class GraphAttributes which extends a Graph by additional attributes.
Data type for general directed graphs (adjacency list representation).
int numberOfNodes() const
Returns the number of nodes in the graph.
internal::GraphObjectContainer< NodeElement > nodes
The container containing all node objects.
Dynamic arrays indexed with nodes.
void init()
Reinitializes the array. Associates the array with no graph.
Class for the representation of nodes.
binomial coeffs from Hachuls FMMM
void free_array()
Free space for BK.
TYP ** m_binCoeffs
holds the binominal coefficients
void init_array()
Init BK -matrix for values n, k in 0 to t.
TYP value(unsigned int n, unsigned int k) const
utility class to select multiple nodes randomly
int nodesLeft() const
number of nodes available
node chooseNode() const
chooses a node from the available nodes in O(1)
int m_numNodes
total num nodes
NodeArray< int > m_nodeIndex
the index in the array of the nodes
void removeNode(node v)
removes a node from available nodes (assumes v is available) in O(1)
int m_numNodesChoosen
num available nodes
RandomNodeSet(const Graph &G)
init the random node set with the given graph. takes O(n)
~RandomNodeSet()
destructor
const Graph & m_graph
the graph
bool isAvailable(node v) const
node * m_array
the set of all nodes (at the end the available nodes)
int randomNumber(int low, int high)
Returns random integer between low and high (including).
Include of header files for SSE-intrinsics.
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
void randomGridGraph(Graph &G, int n, int m, double missinNodesPercentage=0.03)
uint32_t prevPowerOfTwo(uint32_t n)
returns the prev power of two
void gridGraph(Graph &G, int n, int m)
FuncInvoker< FunctionType, ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8 > createFuncInvoker(FunctionType func, ArgType1 _arg1, ArgType2 _arg2, ArgType3 _arg3, ArgType4 _arg4, ArgType5 _arg5, ArgType6 _arg6, ArgType7 _arg7, ArgType8 _arg8)
T * align_16_prev_ptr(T *t)
void printProfiledTime(double t, const char *text)
MNR_T mortonNumber(C_T ix, C_T iy)
common template for bit-interleaving to compute the morton number assumes sizeOf(MNR_T) = 2*sizeOf(C_...
void mortonNumberInv(MNR_T mnr, C_T &x, C_T &y)
common template for extracting the coordinates from a morton number assumes sizeOf(MNR_T) = 2*sizeOf(...
uint32_t mostSignificantBit(T n)
returns the index of the most signficant bit set. 0 = most signif, bitlength-1 = least signif
T * align_16_next_ptr(T *t)
void OGDF_FME_Print_Config()
The namespace for all OGDF objects.
FuncInvoker(FunctionType f, ArgType1 _arg1, ArgType2 _arg2, ArgType3 _arg3, ArgType4 _arg4, ArgType5 _arg5)
FuncInvoker(FunctionType f, ArgType1 _arg1, ArgType2 _arg2)
FuncInvoker(FunctionType f, ArgType1 _arg1)
FuncInvoker(FunctionType f, ArgType1 _arg1, ArgType2 _arg2, ArgType3 _arg3, ArgType4 _arg4, ArgType5 _arg5, ArgType6 _arg6, ArgType7 _arg7)
FuncInvoker(FunctionType f, ArgType1 _arg1, ArgType2 _arg2, ArgType3 _arg3)
FuncInvoker(FunctionType f, ArgType1 _arg1, ArgType2 _arg2, ArgType3 _arg3, ArgType4 _arg4)
FuncInvoker(FunctionType f, ArgType1 _arg1, ArgType2 _arg2, ArgType3 _arg3, ArgType4 _arg4, ArgType5 _arg5, ArgType6 _arg6)
FuncInvoker(FunctionType f)
FuncInvoker(FunctionType f, ArgType1 _arg1, ArgType2 _arg2, ArgType3 _arg3, ArgType4 _arg4, ArgType5 _arg5, ArgType6 _arg6, ArgType7 _arg7, ArgType8 _arg8)