Skip to content
Snippets Groups Projects
Commit 51ebb0db authored by p-hamann's avatar p-hamann
Browse files

Update style of graph and partition datastructures

parent 70358d56
No related merge requests found
......@@ -12,10 +12,12 @@ public:
* @param Adjacency lists
*/
graph(std::vector<std::vector<unsigned int>> a);
/** @brief Returns the number of vertices of the graph
* @return Number of vertices
*/
unsigned int num_vertices() const;
/** @brief Provides access to the adjacency of a vertex
* @param Vertex Id
* @return Adjacency of the vertex
......
......@@ -11,20 +11,24 @@ using vertex_id = unsigned int;
class partition {
public:
enum subgraph { sg_a = -1, sg_b = 1, none = 0 };
/** @brief Initializes an empty partition
* @param Pointer to the graph to be partitioned
*/
partition(graph* g);
/** @brief Returns the number of vertices of an element of the partition
* @param Subgraph A, B or none
* @return Number of vertices of sg
*/
unsigned int num_vertices(subgraph sg);
/** @brief Assigns a vertex to a subgraph
* @param Vertex Id
* @param Subgraph A or B
*/
void assign_vertex(vertex_id v, subgraph sg);
/** @brief Reverts the assignment of a vertex to a subgraph
* @param Vertex Id
*/
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment