Skip to content

Commit d84be7c

Browse files
authored
Updated Documentation of Code for Partition and Partition Statistics
1 parent 4b1adcb commit d84be7c

File tree

3 files changed

+85
-21
lines changed

3 files changed

+85
-21
lines changed

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required(VERSION 3.9)
22

33
# set the project name and version
4-
project(CXXGraph VERSION 0.1.2)
4+
project(CXXGraph VERSION 0.1.3)
55

66
configure_file(CXXGraphConfig.h.in ${PROJECT_SOURCE_DIR}/include/CXXGraphConfig.h)
77

docs/Doxyfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ PROJECT_NAME = "CXXGraph"
3838
# could be handy for archiving the generated documentation or if some version
3939
# control system is used.
4040

41-
PROJECT_NUMBER = 0.1.2
41+
PROJECT_NUMBER = 0.1.3
4242

4343
# Using the PROJECT_BRIEF tag one can provide an optional one line description
4444
# for a project that appears at the top of each page and should give viewer a

include/Graph.hpp

+83-19
Original file line numberDiff line numberDiff line change
@@ -1569,29 +1569,110 @@ namespace CXXGRAPH
15691569
Partition(const std::list<const Edge<T> *> &edgeSet);
15701570
Partition(unsigned int partitionId, const std::list<const Edge<T> *> &edgeSet);
15711571
~Partition() = default;
1572-
1572+
/**
1573+
* @brief Get the Partition ID
1574+
*
1575+
* @return The ID of the partition
1576+
*/
15731577
unsigned int getPartitionId() const;
1578+
/**
1579+
* @brief Set the Partition ID
1580+
*
1581+
* @param partitionId the ID to set
1582+
*/
15741583
void setPartitionId(unsigned int partitionId);
15751584

15761585
private:
15771586
unsigned int partitionId;
15781587
};
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+
*/
15791596
template <typename T>
15801597
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+
*/
15811606
template <typename T>
15821607
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+
*/
15831616
template <typename T>
15841617
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+
*/
15851626
template <typename T>
15861627
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+
*/
15871636
template <typename T>
15881637
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+
*/
15891646
template <typename T>
15901647
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+
*/
15911656
template <typename T>
15921657
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+
*/
15931666
template <typename T>
15941667
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+
*/
15951676
template <typename T>
15961677
static unsigned int getNumberOfReplicatedNodes(const PartitionMap<T> &partitionMap);
15971678

@@ -1864,23 +1945,6 @@ namespace CXXGRAPH
18641945
}
18651946
return os;
18661947
}
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+
18851949
} // namespace CXXGRAPH
18861950
#endif // __CXXGRAPH_H__

0 commit comments

Comments
 (0)