Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
graph_coloring_test.cc File Reference
#include <gtest/gtest.h>
#include <stdexcept>
#include <string>
#include <algorithm>
#include <random>
#include <vector>
#include <Graph_Coloring.H>
#include <tpl_sgraph.H>
#include <tpl_agraph.H>
Include dependency graph for graph_coloring_test.cc:

Go to the source code of this file.

Typedefs

using Graph = List_Graph< Graph_Node< std::string >, Graph_Arc< Empty_Class > >
 
using DGraph = List_Digraph< Graph_Node< std::string >, Graph_Arc< Empty_Class > >
 
using SGraph = List_SGraph< Graph_Snode< int >, Graph_Sarc< Empty_Class > >
 
using AGraph = Array_Graph< Graph_Anode< std::string >, Graph_Aarc< Empty_Class > >
 

Functions

static Graph build_complete_graph (size_t n)
 
static Graph build_cycle (size_t n)
 
static Graph build_path (size_t n)
 
static Graph build_star (size_t n)
 
static Graph build_petersen ()
 
static Graph build_wheel (size_t n)
 
static Graph build_complete_bipartite (size_t m, size_t n)
 
static size_t count_distinct_colors (const DynMapTree< Graph::Node *, size_t > &colors)
 
 TEST (GraphColoring, EmptyGraph)
 
 TEST (GraphColoring, SingleNode)
 
 TEST (GraphColoring, IsolatedNodes)
 
 TEST (GraphColoring, CompleteK2)
 
 TEST (GraphColoring, CompleteK3)
 
 TEST (GraphColoring, CompleteK4)
 
 TEST (GraphColoring, CompleteK5)
 
 TEST (GraphColoring, CompleteBipartiteK33)
 
 TEST (GraphColoring, Path5)
 
 TEST (GraphColoring, Star6)
 
 TEST (GraphColoring, TreeChain)
 
 TEST (GraphColoring, EvenCycle)
 
 TEST (GraphColoring, OddCycle)
 
 TEST (GraphColoring, Triangle)
 
 TEST (GraphColoring, PetersenGraph)
 
 TEST (GraphColoring, DisconnectedComponents)
 
 TEST (GraphColoring, DisconnectedMixed)
 
 TEST (GraphColoring, WheelW5EvenRing)
 
 TEST (GraphColoring, WheelW6OddRing)
 
 TEST (GraphColoring, AllAlgorithmsProduceValidColorings)
 
 TEST (GraphColoring, GreedyBoundDeltaPlusOne)
 
 TEST (GraphColoring, ValidationRejectsInvalidColoring)
 
 TEST (GraphColoring, ValidationRejectsMissingNode)
 
 TEST (GraphColoring, ValidationRejectsForeignKeyedMap)
 
 TEST (GraphColoring, ValidationRejectsIsolatedNodeMissingFromColors)
 
 TEST (GraphColoring, ValidationRejectsSelfLoop)
 
 TEST (GraphColoring, ValidationRejectsParallelEdge)
 
 TEST (GraphColoring, ChromaticNumberEmptyGraph)
 
 TEST (GraphColoring, ChromaticNumberIsolatedNodes)
 
 TEST (GraphColoring, ChromaticNumberK4)
 
 TEST (GraphColoring, ChromaticNumberPetersen)
 
 TEST (GraphColoring, ChromaticNumberOddCycle)
 
 TEST (GraphColoring, ChromaticNumberEvenCycle)
 
 TEST (GraphColoring, ChromaticNumberBipartite)
 
 TEST (GraphColoring, ChromaticNumberTooManyNodes)
 
 TEST (GraphColoring, ChromaticNumber64Nodes)
 
 TEST (GraphColoring, SGraphBasicColoring)
 
 TEST (GraphColoring, SGraphGreedy)
 
 TEST (GraphColoring, DigraphSingleArcUsesTwoColors)
 
 TEST (GraphColoring, DigraphReverseOrderStillUsesTwoColors)
 
 TEST (GraphColoring, AGraphTriangle)
 
 TEST (GraphColoring, FunctorWrappers)
 
 TEST (GraphColoring, CookiesPreservedAfterColoring)
 
 TEST (GraphColoring, SouthAmericaMapColoring)
 
 TEST (GraphColoring, ExamScheduling)
 
 TEST (GraphColoring, ChromaticNumberWheelEvenRing)
 
 TEST (GraphColoring, ChromaticNumberWheelOddRing)
 
 TEST (GraphColoring, RandomGraphsPropertyBased)
 

Typedef Documentation

◆ AGraph

Definition at line 31 of file graph_coloring_test.cc.

◆ DGraph

Definition at line 29 of file graph_coloring_test.cc.

◆ Graph

using Graph = List_Graph<Graph_Node<std::string>, Graph_Arc<Empty_Class> >

Definition at line 28 of file graph_coloring_test.cc.

◆ SGraph

Definition at line 30 of file graph_coloring_test.cc.

Function Documentation

◆ build_complete_bipartite()

◆ build_complete_graph()

◆ build_cycle()

◆ build_path()

static Graph build_path ( size_t  n)
static

◆ build_petersen()

◆ build_star()

static Graph build_star ( size_t  n)
static

◆ build_wheel()

◆ count_distinct_colors()

◆ TEST() [1/48]

◆ TEST() [2/48]

TEST ( GraphColoring  ,
AllAlgorithmsProduceValidColorings   
)

◆ TEST() [3/48]

◆ TEST() [4/48]

TEST ( GraphColoring  ,
ChromaticNumberBipartite   
)

◆ TEST() [5/48]

TEST ( GraphColoring  ,
ChromaticNumberEmptyGraph   
)

◆ TEST() [6/48]

TEST ( GraphColoring  ,
ChromaticNumberEvenCycle   
)

◆ TEST() [7/48]

◆ TEST() [8/48]

◆ TEST() [9/48]

TEST ( GraphColoring  ,
ChromaticNumberOddCycle   
)

◆ TEST() [10/48]

TEST ( GraphColoring  ,
ChromaticNumberPetersen   
)

◆ TEST() [11/48]

TEST ( GraphColoring  ,
ChromaticNumberTooManyNodes   
)

◆ TEST() [12/48]

TEST ( GraphColoring  ,
ChromaticNumberWheelEvenRing   
)

◆ TEST() [13/48]

TEST ( GraphColoring  ,
ChromaticNumberWheelOddRing   
)

◆ TEST() [14/48]

TEST ( GraphColoring  ,
CompleteBipartiteK33   
)

◆ TEST() [15/48]

◆ TEST() [16/48]

TEST ( GraphColoring  ,
CompleteK3   
)

◆ TEST() [17/48]

TEST ( GraphColoring  ,
CompleteK4   
)

◆ TEST() [18/48]

TEST ( GraphColoring  ,
CompleteK5   
)

◆ TEST() [19/48]

◆ TEST() [20/48]

◆ TEST() [21/48]

◆ TEST() [22/48]

◆ TEST() [23/48]

◆ TEST() [24/48]

◆ TEST() [25/48]

TEST ( GraphColoring  ,
EvenCycle   
)

◆ TEST() [26/48]

◆ TEST() [27/48]

TEST ( GraphColoring  ,
FunctorWrappers   
)

◆ TEST() [28/48]

TEST ( GraphColoring  ,
GreedyBoundDeltaPlusOne   
)

◆ TEST() [29/48]

◆ TEST() [30/48]

TEST ( GraphColoring  ,
OddCycle   
)

◆ TEST() [31/48]

TEST ( GraphColoring  ,
Path5   
)

◆ TEST() [32/48]

TEST ( GraphColoring  ,
PetersenGraph   
)

◆ TEST() [33/48]

◆ TEST() [34/48]

◆ TEST() [35/48]

◆ TEST() [36/48]

◆ TEST() [37/48]

◆ TEST() [38/48]

TEST ( GraphColoring  ,
Star6   
)

◆ TEST() [39/48]

TEST ( GraphColoring  ,
TreeChain   
)

◆ TEST() [40/48]

◆ TEST() [41/48]

◆ TEST() [42/48]

TEST ( GraphColoring  ,
ValidationRejectsInvalidColoring   
)

◆ TEST() [43/48]

◆ TEST() [44/48]

◆ TEST() [45/48]

◆ TEST() [46/48]

◆ TEST() [47/48]

TEST ( GraphColoring  ,
WheelW5EvenRing   
)

◆ TEST() [48/48]

TEST ( GraphColoring  ,
WheelW6OddRing   
)