aGrUM  0.16.0
gum::prm::gspan Namespace Reference

Classes

class  DFSCode
 Reprensent a Depth First Search coding of a graph. More...
 
class  DFSTree
 A DFSTree is used by gspan to sort lexicographically patterns discovered in an interface graph. More...
 
class  EdgeCode
 represent a DFS code used by gspan. More...
 
struct  EdgeData
 Inner class to handle data about edges in __graph. More...
 
class  EdgeGrowth
 This class is used to define an edge growth of a pattern in this DFSTree. More...
 
class  FrequenceSearch
 This is class is an implementation of a simple serach strategy for the gspan algorithm: it accept a growth if its frequency is above a user defined value. More...
 
class  InterfaceGraph
 This class represent the interface graph of a given gum::prm::PRMSystem<GUM_SCALAR>. More...
 
struct  LabelData
 Inner class to handle data about labels in this interface graph. More...
 
struct  NodeData
 Inner class to handle data about nodes in __graph. More...
 
class  Pattern
 This contains all the information we want for a node in a DFSTree. More...
 
class  SearchStrategy
 This is an abstract class used to tune search strategies in the gspan algorithm. More...
 
class  StrictSearch
 This is class is an implementation of a strict strategy for the GSpan algorithm. More...
 
class  TreeWidthSearch
 A growth is accepted if and only if the new growth has a tree width less large or equal than its father. More...
 

Functions

std::ostream & operator<< (std::ostream &out, const DFSCode &code)
 Print code in out. More...
 
template<typename GUM_SCALAR >
INLINE std::ostream & operator<< (std::ostream &out, const EdgeGrowth< GUM_SCALAR > &edge)
 
std::ostream & operator<< (std::ostream &out, const EdgeCode &code)
 Print code in out. More...
 
template<typename GUM_SCALAR >
std::ostream & operator<< (std::ostream &out, const EdgeGrowth< GUM_SCALAR > &edge)
 
std::ostream & operator<< (std::ostream &out, const LabelData &data)
 Print a LabelData in out. More...
 
template<typename GUM_SCALAR >
std::ostream & operator<< (std::ostream &out, const NodeData< GUM_SCALAR > &data)
 Print a NodeData<GUM_SCALAR> in out. More...
 
template<typename GUM_SCALAR >
std::ostream & operator<< (std::ostream &out, const EdgeData< GUM_SCALAR > &data)
 Print a EdgeData<GUM_SCALAR> in out. More...
 
template<typename GUM_SCALAR >
INLINE std::ostream & operator<< (std::ostream &out, const NodeData< GUM_SCALAR > &data)
 Print a NodeData<GUM_SCALAR> in out. More...
 
template<typename GUM_SCALAR >
INLINE std::ostream & operator<< (std::ostream &out, const EdgeData< GUM_SCALAR > &data)
 Print a EdgeData<GUM_SCALAR> in out. More...
 

Function Documentation

◆ operator<<() [1/9]

std::ostream & gum::prm::gspan::operator<< ( std::ostream &  out,
const LabelData data 
)

Print a LabelData in out.

Parameters
outThe stream in which data is printed.
dataThe data printed.
Returns
Returns out.

Definition at line 36 of file interfaceGraph.cpp.

References gum::prm::gspan::LabelData::l.

36  {
37  out << data.l;
38  return out;
39  }

◆ operator<<() [2/9]

std::ostream & gum::prm::gspan::operator<< ( std::ostream &  out,
const DFSCode code 
)

Print code in out.

Parameters
outThe stream in which code is printed.
codeThe printed DFSCode.
Returns
Returns out after printing code in it.

Definition at line 40 of file DFSCode.cpp.

References gum::prm::gspan::DFSCode::codes.

40  {
41  out << "[ ";
42  bool first = true;
43 
44  for (const auto item : code.codes) {
45  if (!first) out << ", ";
46  out << *item;
47  first = false;
48  }
49 
50  out << " ]";
51  return out;
52  }

◆ operator<<() [3/9]

std::ostream & gum::prm::gspan::operator<< ( std::ostream &  out,
const EdgeCode code 
)

Print code in out.

Parameters
outThe stream in which code is printed.
codeThe printed EdgeCode.
Returns
Returns out after printing code in it.

Definition at line 40 of file edgeCode.cpp.

References gum::prm::gspan::EdgeCode::i, gum::prm::gspan::EdgeCode::j, gum::prm::gspan::EdgeCode::l_i, gum::prm::gspan::EdgeCode::l_ij, and gum::prm::gspan::EdgeCode::l_j.

40  {
41  out << "(" << code.i << ", " << code.j << ", " << code.l_i << ", ";
42  out << code.l_ij << ", " << code.l_j << ")";
43  return out;
44  }

◆ operator<<() [4/9]

template<typename GUM_SCALAR >
std::ostream& gum::prm::gspan::operator<< ( std::ostream &  out,
const EdgeGrowth< GUM_SCALAR > &  edge 
)

Definition at line 505 of file DFSTree_tpl.h.

References gum::prm::gspan::EdgeGrowth< GUM_SCALAR >::edge, gum::prm::gspan::EdgeGrowth< GUM_SCALAR >::l_v, gum::prm::gspan::EdgeGrowth< GUM_SCALAR >::u, and gum::prm::gspan::EdgeGrowth< GUM_SCALAR >::v.

506  {
507  out << edge.u << ", " << *(edge.edge) << ", " << *(edge.l_v) << ", "
508  << edge.v;
509  return out;
510  }

◆ operator<<() [5/9]

template<typename GUM_SCALAR >
std::ostream& gum::prm::gspan::operator<< ( std::ostream &  out,
const NodeData< GUM_SCALAR > &  data 
)

Print a NodeData<GUM_SCALAR> in out.

Parameters
outThe stream in which data is printed.
dataThe data printed.
Returns
Returns out.

Definition at line 387 of file interfaceGraph_tpl.h.

References gum::prm::gspan::NodeData< GUM_SCALAR >::l, and gum::prm::gspan::NodeData< GUM_SCALAR >::n.

388  {
389  out << data.n->name() << "(" << data.l->l << ")";
390  return out;
391  }

◆ operator<<() [6/9]

template<typename GUM_SCALAR >
std::ostream& gum::prm::gspan::operator<< ( std::ostream &  out,
const EdgeData< GUM_SCALAR > &  data 
)

Print a EdgeData<GUM_SCALAR> in out.

Parameters
outThe stream in which data is printed.
dataThe data printed.
Returns
Returns out.

Definition at line 394 of file interfaceGraph_tpl.h.

References gum::prm::gspan::EdgeData< GUM_SCALAR >::l, gum::prm::gspan::EdgeData< GUM_SCALAR >::u, and gum::prm::gspan::EdgeData< GUM_SCALAR >::v.

395  {
396  out << data.u->name() << " -> " << data.v->name() << "(" << data.l->l
397  << ")";
398  return out;
399  }

◆ operator<<() [7/9]

template<typename GUM_SCALAR >
INLINE std::ostream& gum::prm::gspan::operator<< ( std::ostream &  out,
const NodeData< GUM_SCALAR > &  data 
)

Print a NodeData<GUM_SCALAR> in out.

Parameters
outThe stream in which data is printed.
dataThe data printed.
Returns
Returns out.

Definition at line 387 of file interfaceGraph_tpl.h.

References gum::prm::gspan::NodeData< GUM_SCALAR >::l, and gum::prm::gspan::NodeData< GUM_SCALAR >::n.

388  {
389  out << data.n->name() << "(" << data.l->l << ")";
390  return out;
391  }

◆ operator<<() [8/9]

template<typename GUM_SCALAR >
INLINE std::ostream& gum::prm::gspan::operator<< ( std::ostream &  out,
const EdgeData< GUM_SCALAR > &  data 
)

Print a EdgeData<GUM_SCALAR> in out.

Parameters
outThe stream in which data is printed.
dataThe data printed.
Returns
Returns out.

Definition at line 394 of file interfaceGraph_tpl.h.

References gum::prm::gspan::EdgeData< GUM_SCALAR >::l, gum::prm::gspan::EdgeData< GUM_SCALAR >::u, and gum::prm::gspan::EdgeData< GUM_SCALAR >::v.

395  {
396  out << data.u->name() << " -> " << data.v->name() << "(" << data.l->l
397  << ")";
398  return out;
399  }

◆ operator<<() [9/9]

template<typename GUM_SCALAR >
INLINE std::ostream& gum::prm::gspan::operator<< ( std::ostream &  out,
const EdgeGrowth< GUM_SCALAR > &  edge 
)

Definition at line 505 of file DFSTree_tpl.h.

References gum::prm::gspan::EdgeGrowth< GUM_SCALAR >::edge, gum::prm::gspan::EdgeGrowth< GUM_SCALAR >::l_v, gum::prm::gspan::EdgeGrowth< GUM_SCALAR >::u, and gum::prm::gspan::EdgeGrowth< GUM_SCALAR >::v.

506  {
507  out << edge.u << ", " << *(edge.edge) << ", " << *(edge.l_v) << ", "
508  << edge.v;
509  return out;
510  }