aGrUM  0.13.2
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

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 33 of file interfaceGraph.cpp.

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

33  {
34  out << data.l;
35  return out;
36  }
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 37 of file DFSCode.cpp.

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

37  {
38  out << "[ ";
39  bool first = true;
40 
41  for (const auto item : code.codes) {
42  if (!first) out << ", ";
43  out << *item;
44  first = false;
45  }
46 
47  out << " ]";
48  return out;
49  }
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 37 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.

37  {
38  out << "(" << code.i << ", " << code.j << ", " << code.l_i << ", ";
39  out << code.l_ij << ", " << code.l_j << ")";
40  return out;
41  }
template<typename GUM_SCALAR >
std::ostream& gum::prm::gspan::operator<< ( std::ostream &  out,
const EdgeGrowth< GUM_SCALAR > &  edge 
)

Definition at line 502 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.

503  {
504  out << edge.u << ", " << *(edge.edge) << ", " << *(edge.l_v) << ", "
505  << edge.v;
506  return out;
507  }
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 384 of file interfaceGraph_tpl.h.

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

385  {
386  out << data.n->name() << "(" << data.l->l << ")";
387  return out;
388  }
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 391 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.

392  {
393  out << data.u->name() << " -> " << data.v->name() << "(" << data.l->l
394  << ")";
395  return out;
396  }
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 384 of file interfaceGraph_tpl.h.

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

385  {
386  out << data.n->name() << "(" << data.l->l << ")";
387  return out;
388  }
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 391 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.

392  {
393  out << data.u->name() << " -> " << data.v->name() << "(" << data.l->l
394  << ")";
395  return out;
396  }
template<typename GUM_SCALAR >
INLINE std::ostream& gum::prm::gspan::operator<< ( std::ostream &  out,
const EdgeGrowth< GUM_SCALAR > &  edge 
)

Definition at line 502 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.

503  {
504  out << edge.u << ", " << *(edge.edge) << ", " << *(edge.l_v) << ", "
505  << edge.v;
506  return out;
507  }