Skip to content

Commit 47db35e

Browse files
committed
improving scaling
1 parent 230edf7 commit 47db35e

File tree

7 files changed

+7
-26
lines changed

7 files changed

+7
-26
lines changed

ConjectureCheck/ConjectureCheck.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,4 @@ class ConjectureCheck {
1616
std::map<std::string, vector<std::string>> CheckReturn(ConjectureType ct, std::unique_ptr<ReportInterface> r,
1717
std::string input_file_name);
1818
};
19-
20-
2119
#endif //CGTEA_CONJECTURECHECK_H

ConjectureCheck/TeaTable.h

Lines changed: 0 additions & 12 deletions
This file was deleted.

datatypes.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,16 +140,14 @@ typedef boost::graph_traits<Graph>::adjacency_iterator AdjacencyIterator;
140140

141141
template<typename Lambda>
142142
static void for_each_neighbor_const(const Ver& v, const Graph& g, Lambda func) {
143-
AdjacencyIterator vi, vi_end;
144-
std::tie(vi, vi_end) = boost::adjacent_vertices(v, g);
143+
auto [vi, vi_end] = boost::adjacent_vertices(v, g);
145144
std::for_each(vi,vi_end,func);
146145
}
147146

148147

149148
template<typename Lambda>
150149
static void for_each_neighbor(const Ver& v, Graph& g, Lambda func) {
151-
AdjacencyIterator vi, vi_end;
152-
std::tie(vi, vi_end) = boost::adjacent_vertices(v, g);
150+
auto [vi, vi_end] = boost::adjacent_vertices(v, g);
153151
std::for_each(vi,vi_end,func);
154152
}
155153

@@ -161,8 +159,6 @@ static void for_each_out_edges(const Ver& v, Graph& g, Lambda func) {
161159
}
162160

163161
typedef boost::rectangle_topology<> topology_type;
164-
165-
166162
typedef boost::exterior_vertex_property<Graph, int> DistanceProperty;
167163
typedef DistanceProperty::matrix_type DistanceMatrix;
168164
typedef DistanceProperty::matrix_map_type DistanceMatrixMap;

generators/CocktailParty.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* - Reference: https://mathworld.wolfram.com/CocktailPartyGraph.html
1212
* - A graph consisting of two rows of paired nodes in which all nodes
1313
* except the paired ones are connected with straight lines
14-
* - So called because it can be visualised as the set of handshakes
14+
* - So-called because it can be visualized as the set of handshakes
1515
* if n couples go to a party and each person shakes hands with every person except his or her partner.
1616
*
1717
*/
@@ -22,15 +22,13 @@ class CocktailParty : public GeneratorInterface {
2222

2323
Graph generate_with_positions(unsigned int n, unsigned int k, double width, double height) override {
2424
Graph g;
25-
26-
2725
for (int i = 0; i < n; i++) {
2826
for (int j = 0; j < n; j++) {
2927
if (i == j) continue;
3028
add_edge(i, n + j, g);
3129
add_edge(i,j, g);
3230
add_edge(n+i,n+j, g);
33-
31+
3432
}
3533
}
3634
std::vector<cgtea_geometry::Point> pos = position_generators::circle(width, height, 200.0, 2*n);

generators/GeneratorInterface.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
class GeneratorInterface {
1414
public:
15+
virtual ~GeneratorInterface() = default;
1516
virtual Graph generate(unsigned int n, unsigned int k) { return Graph(); };
1617

1718
virtual Graph

generators/Pmn.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@ class Pmn : public GeneratorInterface {
1111
public:
1212
explicit Pmn() : GeneratorInterface() {};
1313

14-
Graph generate(unsigned int n, unsigned int k) override {
14+
Graph generate(unsigned int n, unsigned int m) override {
1515
Graph g;
16-
1716
for (int i = 0; i < n; i++)
1817
for (int j = 0; j < m; j++) {
1918
if (j < m - 1) {

reports/ReportInterface.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
class ReportInterface {
1212
public:
13+
virtual ~ReportInterface() = default;
1314
virtual string report(const Graph& g) = 0;
1415
[[nodiscard]] virtual string name() const = 0;
1516
[[nodiscard]] virtual string description() const = 0;

0 commit comments

Comments
 (0)