@@ -1569,29 +1569,110 @@ namespace CXXGRAPH
1569
1569
Partition (const std::list<const Edge<T> *> &edgeSet);
1570
1570
Partition (unsigned int partitionId, const std::list<const Edge<T> *> &edgeSet);
1571
1571
~Partition () = default ;
1572
-
1572
+ /* *
1573
+ * @brief Get the Partition ID
1574
+ *
1575
+ * @return The ID of the partition
1576
+ */
1573
1577
unsigned int getPartitionId () const ;
1578
+ /* *
1579
+ * @brief Set the Partition ID
1580
+ *
1581
+ * @param partitionId the ID to set
1582
+ */
1574
1583
void setPartitionId (unsigned int partitionId);
1575
1584
1576
1585
private:
1577
1586
unsigned int partitionId;
1578
1587
};
1588
+
1589
+ /* *
1590
+ * @brief Calculate and return the statistic of the Partitioned Graph
1591
+ *
1592
+ * @param partitionMap the Partition Map
1593
+ *
1594
+ * @return The Statistic of the Partioned Graph
1595
+ */
1579
1596
template <typename T>
1580
1597
static PartitioningStats getPartitionStats (const PartitionMap<T> &partitionMap);
1598
+
1599
+ /* *
1600
+ * @brief Calculate the Maximum Load in a single partition (in terms of edges) for the Partioned Graph
1601
+ *
1602
+ * @param partitionMap the Partition Map
1603
+ *
1604
+ * @return The value of the Maximum Load
1605
+ */
1581
1606
template <typename T>
1582
1607
static unsigned int getMaxEdgesLoad (const PartitionMap<T> &partitionMap);
1608
+
1609
+ /* *
1610
+ * @brief Calculate the Minimum Load in a single partition (in terms of edges) for the Partioned Graph
1611
+ *
1612
+ * @param partitionMap the Partition Map
1613
+ *
1614
+ * @return The value of the Minimum Load
1615
+ */
1583
1616
template <typename T>
1584
1617
static unsigned int getMinEdgesLoad (const PartitionMap<T> &partitionMap);
1618
+
1619
+ /* *
1620
+ * @brief Calculate the Maximum Load in a single partition (in terms of nodes) for the Partioned Graph
1621
+ *
1622
+ * @param partitionMap the Partition Map
1623
+ *
1624
+ * @return The value of the Maximum Load
1625
+ */
1585
1626
template <typename T>
1586
1627
static unsigned int getMaxNodesLoad (const PartitionMap<T> &partitionMap);
1628
+
1629
+ /* *
1630
+ * @brief Calculate the Minimum Load in a single partition (in terms of nodes) for the Partioned Graph
1631
+ *
1632
+ * @param partitionMap the Partition Map
1633
+ *
1634
+ * @return The value of the Minimum Load
1635
+ */
1587
1636
template <typename T>
1588
1637
static unsigned int getMinNodesLoad (const PartitionMap<T> &partitionMap);
1638
+
1639
+ /* *
1640
+ * @brief Calculate the Number of Unique Edges in the Partitioned Graph ( this value is equal to the number of edges in the Original Graph)
1641
+ *
1642
+ * @param partitionMap the Partition Map
1643
+ *
1644
+ * @return The number of Edges
1645
+ */
1589
1646
template <typename T>
1590
1647
static unsigned int getNumberOfEdges (const PartitionMap<T> &partitionMap);
1648
+
1649
+ /* *
1650
+ * @brief Calculate the Number of Unique Nodes in the Partitioned Graph ( this value is equal to the number of nodes in the Original Graph)
1651
+ *
1652
+ * @param partitionMap the Partition Map
1653
+ *
1654
+ * @return The number of Nodes
1655
+ */
1591
1656
template <typename T>
1592
1657
static unsigned int getNumberOfNodes (const PartitionMap<T> &partitionMap);
1658
+
1659
+ /* *
1660
+ * @brief Calculate the Total Number of Edges in the Partitioned Graph
1661
+ *
1662
+ * @param partitionMap the Partition Map
1663
+ *
1664
+ * @return The number of Edges
1665
+ */
1593
1666
template <typename T>
1594
1667
static unsigned int getNumberOfReplicatedEdges (const PartitionMap<T> &partitionMap);
1668
+
1669
+ /* *
1670
+ * @brief Calculate the Total Number of Nodes in the Partitioned Graph
1671
+ *
1672
+ * @param partitionMap the Partition Map
1673
+ *
1674
+ * @return The number of Nodes
1675
+ */
1595
1676
template <typename T>
1596
1677
static unsigned int getNumberOfReplicatedNodes (const PartitionMap<T> &partitionMap);
1597
1678
@@ -1864,23 +1945,6 @@ namespace CXXGRAPH
1864
1945
}
1865
1946
return os;
1866
1947
}
1867
- /*
1868
- template <typename T>
1869
- std::ostream &operator<<(std::ostream &os, const PartitioningStats_struct &partitionStats)
1870
- {
1871
- os << "Partitioning Stats:\n";
1872
- os << "\tNumber of Partitions:" << partitionStats.numberOfPartitions << "\n";
1873
- os << "\tNumber of Nodes: " << partitionStats.numberOfNodes << "\n";
1874
- os << "\tNumber of Edges: " << partitionStats.numberOfEdges << "\n";
1875
- os << "\tNumber of Nodes Replica: " << partitionStats.replicatedNodesCount << "\n";
1876
- os << "\tNumber of Edges Replica: " << partitionStats.replicatedEdgesCount << "\n";
1877
- os << "\tNodes Replication Factor: " << partitionStats.nodesReplicationFactor << "\n";
1878
- os << "\tEdges Replication Factor: " << partitionStats.edgesReplicationFactor << "\n";
1879
- os << "\tMax Load: " << partitionStats.maxLoad << "\n";
1880
- os << "\tMin Load: " << partitionStats.minLoad << "\n";
1881
- os << "\tBalance Factor: " << partitionStats.balanceFactor << "\n";
1882
- return os;
1883
- }
1884
- */
1948
+
1885
1949
} // namespace CXXGRAPH
1886
1950
#endif // __CXXGRAPH_H__
0 commit comments