Skip to content

Commit 7a5c242

Browse files
committed
Reformatting.
1 parent 649db86 commit 7a5c242

28 files changed

+342
-313
lines changed

src_comb/Boost_bitset.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ Face UnsignedLongToFace(size_t const &len, ulong const &eVal) {
270270
}
271271

272272
void VectVectInt_Print_Kernel(std::ostream &os, vectface const &ListOrbit,
273-
bool const&single_line, int const &shift) {
273+
bool const &single_line, int const &shift) {
274274
size_t nbOrbit = ListOrbit.size();
275275
os << "[";
276276
for (size_t iOrbit = 0; iOrbit < nbOrbit; iOrbit++) {

src_comb/Boost_bitset_kernel.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#ifndef SRC_COMB_BOOST_BITSET_KERNEL_H_
33
#define SRC_COMB_BOOST_BITSET_KERNEL_H_
44

5-
65
// clang-format off
76
#include "boost_serialization.h"
87
#include "hash_functions.h"
@@ -397,7 +396,7 @@ template <typename Tidx> std::vector<Tidx> FaceToVector(Face const &eSet) {
397396
return eList;
398397
}
399398

400-
void WriteVectfaceGAP(std::ostream& os, vectface const& vf) {
399+
void WriteVectfaceGAP(std::ostream &os, vectface const &vf) {
401400
bool IsFirst = true;
402401
os << "[";
403402
for (auto &trig : vf) {
@@ -411,13 +410,12 @@ void WriteVectfaceGAP(std::ostream& os, vectface const& vf) {
411410
os << "]";
412411
}
413412

414-
std::string StringVectfaceGAP(vectface const& vf) {
413+
std::string StringVectfaceGAP(vectface const &vf) {
415414
std::ostringstream os;
416415
WriteVectfaceGAP(os, vf);
417416
return os.str();
418417
}
419418

420-
421419
/*
422420
template<>
423421
void std::swap(Face & x, Face & y)

src_graph/GRAPH_BitsetType.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#include <limits>
77
#include <vector>
88

9-
109
struct GraphBitset {
1110
public:
1211
GraphBitset() = delete;

src_graph/GRAPH_GraphicalBasic.h

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -278,16 +278,16 @@ std::vector<size_t> ConnectedComponents_vector(Tgr const &GR) {
278278
return ListStatus;
279279
}
280280

281-
template<typename Tgr>
282-
bool IsConnectedGraphMinusSubset(Tgr const &GR, std::vector<size_t> const& V) {
281+
template <typename Tgr>
282+
bool IsConnectedGraphMinusSubset(Tgr const &GR, std::vector<size_t> const &V) {
283283
size_t nbVert = GR.GetNbVert();
284284
size_t miss_val = std::numeric_limits<size_t>::max();
285285
Face f_out(nbVert);
286-
for (auto & eVert: V) {
286+
for (auto &eVert : V) {
287287
f_out[eVert] = 1;
288288
}
289-
auto get_out_vert=[&]() -> size_t {
290-
for (size_t u=0; u<nbVert; u++) {
289+
auto get_out_vert = [&]() -> size_t {
290+
for (size_t u = 0; u < nbVert; u++) {
291291
if (f_out[u] == 0) {
292292
return u;
293293
}
@@ -304,10 +304,10 @@ bool IsConnectedGraphMinusSubset(Tgr const &GR, std::vector<size_t> const& V) {
304304
size_t vert_start = 0;
305305
size_t vert_end = 1;
306306
fatt[out_vert] = 1;
307-
while(true) {
307+
while (true) {
308308
size_t pos_vert = vert_end;
309-
for (size_t u=vert_start; u<vert_end; u++) {
310-
for (auto & eAdj : GR.Adjacency(Lvert[u])) {
309+
for (size_t u = vert_start; u < vert_end; u++) {
310+
for (auto &eAdj : GR.Adjacency(Lvert[u])) {
311311
if (f_out[eAdj] == 0 && fatt[eAdj] == 0) {
312312
Lvert[pos_vert] = eAdj;
313313
fatt[eAdj] = 1;
@@ -328,13 +328,12 @@ bool IsConnectedGraphMinusSubset(Tgr const &GR, std::vector<size_t> const& V) {
328328
return false;
329329
}
330330

331-
template<typename Tgr>
332-
bool IsKConnectedGraph(Tgr const &GR, size_t const& k) {
331+
template <typename Tgr> bool IsKConnectedGraph(Tgr const &GR, size_t const &k) {
333332
size_t nbVert = GR.GetNbVert();
334-
SetCppIterator set(nbVert, k-1);
335-
for (auto & V : set) {
333+
SetCppIterator set(nbVert, k - 1);
334+
for (auto &V : set) {
336335
std::vector<size_t> V2;
337-
for (auto & val : V) {
336+
for (auto &val : V) {
338337
V2.push_back(val);
339338
}
340339
bool test = IsConnectedGraphMinusSubset(GR, V2);
@@ -345,7 +344,6 @@ bool IsKConnectedGraph(Tgr const &GR, size_t const& k) {
345344
return true;
346345
}
347346

348-
349347
template <typename Tgr>
350348
std::vector<std::vector<size_t>> ConnectedComponents_set(Tgr const &GR) {
351349
size_t nbVert = GR.GetNbVert();

src_graph/GRAPH_GraphicalFunctions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ template <typename Tgr> Tgr GRAPH_Read(std::istream &is) {
208208
return eGR;
209209
}
210210

211-
template <typename Tgr> Tgr GRAPH_ReadFile(std::string const&file) {
211+
template <typename Tgr> Tgr GRAPH_ReadFile(std::string const &file) {
212212
std::ifstream GRAfs(file);
213213
return GRAPH_Read<Tgr>(GRAfs);
214214
}

src_graph/GRAPH_bliss.h

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,13 @@ struct RecParam {
144144
std::vector<std::vector<unsigned int>> LGen;
145145
};
146146

147-
template<typename TidxG>
148-
std::vector<std::vector<TidxG>> get_generators(bliss::Graph& g, bliss::Stats& stats, size_t n_last) {
147+
template <typename TidxG>
148+
std::vector<std::vector<TidxG>>
149+
get_generators(bliss::Graph &g, bliss::Stats &stats, size_t n_last) {
149150
std::vector<std::vector<TidxG>> ListGen;
150151
std::vector<TidxG> eGen(n_last);
151-
std::function<void(unsigned int n, const unsigned int *aut)> report=[&]([[maybe_unused]] unsigned int n, const unsigned int *aut)-> void {
152+
std::function<void(unsigned int n, const unsigned int *aut)> report =
153+
[&]([[maybe_unused]] unsigned int n, const unsigned int *aut) -> void {
152154
for (size_t i = 0; i < n_last; i++) {
153155
eGen[i] = aut[i];
154156
}
@@ -180,7 +182,8 @@ BLISS_GetCanonicalOrdering_ListGenerators(Tgr const &eGR,
180182
for (size_t i = 0; i < nof_vertices; i++)
181183
vectD[i] = cl[i];
182184
//
183-
std::vector<std::vector<TidxG>> ListGen = get_generators<TidxG>(g, stats, n_last);
185+
std::vector<std::vector<TidxG>> ListGen =
186+
get_generators<TidxG>(g, stats, n_last);
184187
//
185188
return {std::move(vectD), std::move(ListGen)};
186189
}

src_graph/GRAPH_traces.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,8 @@ TRACES_GetCanonicalOrdering_ListGenerators_Arr(
437437
freeschreier(NULL, &gens);
438438
schreier_freedyn();
439439
#ifdef TIMINGS_TRACES
440-
os << "|TRA: TRACES_GetCanonicalOrdering_ListGenerators_Arr|=" << time << "\n";
440+
os << "|TRA: TRACES_GetCanonicalOrdering_ListGenerators_Arr|=" << time
441+
<< "\n";
441442
#endif
442443
return {std::move(V), std::move(ListGen)};
443444
}

src_matrix/AnalysisSingMat.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ int main(int argc, char *argv[]) {
5050
}
5151
std::string eFileName = argv[1];
5252
NAMELIST_ReadNamelistFile(eFileName, eFull);
53-
SingleBlock const& BlPROC = eFull.get_block("PROC");
53+
SingleBlock const &BlPROC = eFull.get_block("PROC");
5454
std::string InputFile = BlPROC.get_string("InputFile");
5555
double thrEigenvalueZero = BlPROC.get_double("thrEigenvalueZero");
5656
double MaximumValueIntSearch = BlPROC.get_int("MaximumValueIntSearch");
@@ -59,7 +59,8 @@ int main(int argc, char *argv[]) {
5959
bool ShowOrthKernel = BlPROC.get_bool("ShowOrthKernel");
6060
bool ShowKernel = BlPROC.get_bool("ShowKernel");
6161
bool CanonicalizeByMinValue = BlPROC.get_bool("CanonicalizeByMinValue");
62-
bool CheckPrimalDualCancellation = BlPROC.get_bool("CheckPrimalDualCancellation");
62+
bool CheckPrimalDualCancellation =
63+
BlPROC.get_bool("CheckPrimalDualCancellation");
6364
std::string PrimalDualPairFile = BlPROC.get_string("PrimalDualPairFile");
6465
// reading the matrix
6566
if (!IsExistingFile(InputFile)) {

src_matrix/DeterminantMatMod.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,15 @@ int main(int argc, char *argv[]) {
5858
try {
5959
if (argc != 4 && argc != 6) {
6060
std::cerr << "This program is used as\n";
61-
std::cerr << "DeterminantMatMod [arith] [matrix_file] [prime] [OutFormat] "
62-
"[OutFile]\n";
61+
std::cerr
62+
<< "DeterminantMatMod [arith] [matrix_file] [prime] [OutFormat] "
63+
"[OutFile]\n";
6364
std::cerr << " or\n";
6465
std::cerr << "DeterminantMatMod [arith] [matrix_file] [prime]\n";
6566
std::cerr << "\n";
6667
std::cerr << " where\n";
67-
std::cerr << "arith: The arithmetic type (safe_rational, rational, safe_integer)\n";
68+
std::cerr << "arith: The arithmetic type (safe_rational, rational, "
69+
"safe_integer)\n";
6870
std::cerr << "matrix_file: The input matrix file\n";
6971
std::cerr << "prime: The modulus (prime number)\n";
7072
std::cerr << "OutFormat: GAP or simple (optional)\n";

0 commit comments

Comments
 (0)