40#define OGDF_DECL_REG_ARRAY_TYPE(v, c) RegisteredArray<QPartitioning, v, c>
43#undef OGDF_DECL_REG_ARRAY_TYPE
51 int q_vertex_count = 0;
52 int partition_next_id = 0;
55 static inline int NO_PARTITION = -1;
58 partitioned_nodes.
init(*
this);
92 int end()
const {
return partition_next_id; }
104 partitioned_nodes.fillWithDefault();
105 partitions.fill(NO_PARTITION);
107 partition_next_id = 0;
Includes declaration of graph class.
Declaration of doubly linked lists and iterators.
#define OGDF_DECL_REG_ARRAY(NAME)
Basic declarations, included by all source files.
Class for the representation of edges.
Data type for general directed graphs (adjacency list representation).
Abstract Base class for graph observers.
Doubly linked lists (maintaining the length of the list).
Class for the representation of nodes.
Dynamic arrays indexed with arbitrary keys.
void init(const Base *base=nullptr)
Reinitializes the array. Associates the array with the matching registry of base.
Abstract base class for registries.
RegisteredArray for nodes, edges and adjEntries of a graph.
Manages the partitioning of Q-nodes in an instance of SyncPlan.
int maxKeyIndex() const
Returns the maximum index of all keys managed by this registry.
void releaseQVertex(node n)
int partitionCount() const
NodeArray< int > partitions
PartitionArray< List< node > > partitioned_nodes
const List< node > & nodesInPartition(int partition) const
void edgeAdded(edge e) override
Called by watched graph after an edge has been added.
void nodeAdded(node v) override
Called by watched graph after a node has been added.
int getPartitionOf(node n) const
void cleared() override
Called by watched graph when its clear function is called, just before things are removed.
int makeQVertex(node n, int p=NO_PARTITION)
Mark a node as Q-node.
QPartitioning(const Graph *G)
void nodeDeleted(node v) override
Called by watched graph just before a node is deleted.
bool isQVertex(node n) const
bool isKeyAssociated(int key) const
Returns whether key is associated with this registry.
static int keyToIndex(int key)
Returns the index of key.
int calculateArraySize(int add) const
Returns the array size currently requested by this registry.
void edgeDeleted(edge e) override
Called by watched graph just before an edge is deleted.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF dynamic library (shared object / DLL),...
int calculateTableSize(int actualCount)
The default growth function for registered arrays.