digiKam
Digikam::ItemHistoryGraphData Class Reference
+ Inheritance diagram for Digikam::ItemHistoryGraphData:

Public Types

typedef graph_traits::adjacency_iterator adjacency_iter
 
typedef std::pair< adjacency_iter, adjacency_iteradjacency_vertex_range_t
 
enum  AdjacencyFlags {
  OutboundEdges = 1 << 0 , InboundEdges = 1 << 1 , EdgesToLeaf = 1 << 2 , EdgesToRoot = 1 << 3 ,
  AllEdges = InboundEdges | OutboundEdges
}
 
typedef boost::property_map< GraphContainer, edge_properties_t >::const_type const_edge_property_map_t
 
typedef boost::property_map< GraphContainer, boost::vertex_index_t >::const_type const_vertex_index_map_t
 
typedef boost::property_map< GraphContainer, vertex_properties_t >::const_type const_vertex_property_map_t
 
typedef graph_traits::degree_size_type degree_t
 
typedef graph_traits::edge_iterator edge_iter
 
typedef boost::property_map< GraphContainer, edge_properties_t >::type edge_property_map_t
 
typedef std::pair< edge_iter, edge_iteredge_range_t
 
typedef graph_traits::edge_descriptor edge_t
 
typedef QPair< Edge, EdgeEdgePair
 
typedef boost::graph_traits< GraphContainergraph_traits
 
typedef boost::adjacency_list< boost::vecS, boost::vecS, boost::bidirectionalS, boost::property< boost::vertex_index_t, int, boost::property< vertex_properties_t, VertexProperties > >, boost::property< edge_properties_t, EdgeProperties > > GraphContainer
 
enum  GraphCopyFlags { CopyVertexProperties = 1 << 0 , CopyEdgeProperties = 1 << 1 , CopyAllProperties = CopyVertexProperties | CopyEdgeProperties }
 
typedef graph_traits::in_edge_iterator in_edge_iter
 
typedef boost::inv_adjacency_iterator_generator< GraphContainer, vertex_t, in_edge_iter >::type inv_adjacency_iter
 
typedef std::pair< inv_adjacency_iter, inv_adjacency_iterinv_adjacency_vertex_range_t
 
typedef graph_traits::out_edge_iterator out_edge_iter
 
typedef std::pair< out_edge_iter, out_edge_iterout_edge_range_t
 
enum  ReturnOrder { BreadthFirstOrder , DepthFirstOrder }
 
typedef boost::property_map< GraphContainer, boost::vertex_index_t >::type vertex_index_map_t
 
typedef graph_traits::vertex_iterator vertex_iter
 
typedef boost::property_map< GraphContainer, vertex_properties_t >::type vertex_property_map_t
 
typedef std::pair< vertex_iter, vertex_itervertex_range_t
 
typedef graph_traits::vertex_descriptor vertex_t
 
typedef QMapForAdaptors< Vertex, int > VertexIntMap
 
typedef boost::associative_property_map< VertexIntMapVertexIntMapAdaptor
 
typedef QPair< Vertex, VertexVertexPair
 
typedef QMapForAdaptors< Vertex, VertexVertexVertexMap
 
typedef boost::associative_property_map< VertexVertexMapVertexVertexMapAdaptor
 

Public Member Functions

Edge addEdge (const Vertex &v1, const Vertex &v2)
 
void addHistory (const DImageHistory &givenHistory, qlonglong extraCurrent=0)
 
Vertex addVertex ()
 
Vertex addVertex (const HistoryImageId &id)
 
Vertex addVertex (const ItemInfo &info)
 
Vertex addVertex (const QList< HistoryImageId > &imageIds)
 
Vertex addVertex (const VertexProperties &properties)
 
Vertex addVertex (qlonglong id)
 
Vertex addVertexScanned (qlonglong id)
 
QList< VertexadjacentVertices (const Vertex &v, AdjacencyFlags flags=AllEdges) const
 
QHash< Vertex, HistoryImageId::Types > categorize () const
 
void clear ()
 
Edge edge (const Vertex &v1, const Vertex &v2) const
 
int edgeCount () const
 
QList< VertexPairedgePairs () const
 
QList< Edgeedges () const
 
QList< Edgeedges (const Vertex &v, AdjacencyFlags flags=AllEdges) const
 
template<class T >
Vertex findVertexByProperties (const T &value) const
 
const GraphContainergetGraph () const
 
bool hasEdge (const Vertex &v1, const Vertex &v2) const
 
bool hasEdges () const
 
bool hasEdges (const Vertex &v, AdjacencyFlags flags=AllEdges) const
 
int inDegree (const Vertex &v) const
 
bool isConnected (const Vertex &v1, const Vertex &v2) const
 Does not care for direction. More...
 
bool isEmpty () const
 
bool isLeaf (const Vertex &v) const
 
bool isRoot (const Vertex &v) const
 
 ItemHistoryGraphData ()
 
 ItemHistoryGraphData (const HistoryGraph &g)
 
QList< Vertexleaves () const
 
QList< VertexleavesFrom (const Vertex &v) const
 
QList< VertexlongestPathTouching (const Vertex &v) const
 
template<typename LessThan >
QList< VertexlongestPathTouching (const Vertex &v, LessThan lessThan) const
 
MeaningOfDirection meaningOfDirection () const
 
ItemHistoryGraphDataoperator= (const HistoryGraph &g)
 
int outDegree (const Vertex &v) const
 
EdgeProperties & properties (const Edge &e)
 
const EdgeProperties & properties (const Edge &e) const
 
VertexProperties & properties (const Vertex &v)
 
const VertexProperties & properties (const Vertex &v) const
 
EdgeProperties properties (const Vertex &v1, const Vertex &v2) const
 
void remove (const Vertex &v)
 
int removeNextUnresolvedVertex (int begin)
 
QList< Vertexroots () const
 
QList< VertexrootsOf (const Vertex &v) const
 
void setProperties (const Edge &e, const EdgeProperties &props)
 
void setProperties (const Vertex &v, const VertexProperties &props)
 
QMap< Vertex, int > shortestDistancesFrom (const Vertex &v) const
 
QList< VertexshortestPath (const Vertex &v1, const Vertex &v2) const
 
Vertex source (const Edge &e) const
 
Vertex target (const Edge &e) const
 
QList< ItemInfotoInfoList (const QList< Vertex > &vertices) const
 
QList< VertextopologicalSort () const
 
Graph transitiveClosure (GraphCopyFlags flags=CopyAllProperties) const
 
Graph transitiveReduction (QList< Edge > *removedEdges=0, GraphCopyFlags flags=CopyAllProperties) const
 
int vertexCount () const
 NOTE: for "hasAdjacentVertices", simply use hasEdges(v, flags) More...
 
QList< Vertexvertices () const
 
QList< VertexverticesBreadthFirst (const Vertex &givenRef=Vertex()) const
 
template<typename LessThan >
QList< VertexverticesDepthFirstSorted (const Vertex &givenRef, LessThan lessThan) const
 
QList< VertexverticesDominatedBy (const Vertex &v, const Vertex &root, const QList< Vertex > &presortedVertices) const
 
QList< VertexverticesDominatedBy (const Vertex &v, const Vertex &root, ReturnOrder order=BreadthFirstOrder) const
 
template<typename LessThan >
QList< VertexverticesDominatedByDepthFirstSorted (const Vertex &v, const Vertex &root, LessThan lessThan) const
 

Static Public Member Functions

template<typename T >
static bool alwaysFalse (const T &, const T &)
 

Protected Member Functions

void applyProperties (Vertex &v, const QList< ItemInfo > &infos, const QList< HistoryImageId > &ids)
 
void copyProperties (Graph &other, GraphCopyFlags flags, const std::vector< vertex_t > &copiedVertices) const
 
QList< EdgeedgeDifference (const Graph &other, const std::vector< vertex_t > &copiedVertices) const
 
QList< VertexfindZeroDegree (bool inOrOut) const
 
QList< VertexfindZeroDegreeFrom (const Vertex &v, bool inOrOut) const
 
QList< VertexlistPath (const Vertex &root, const Vertex &target, const VertexVertexMap &predecessors, MeaningOfDirection dir=ParentToChild) const
 
QList< VertexmostRemoteNodes (const VertexIntMap &distances) const
 
QList< VertextreeFromPredecessors (const Vertex &v, const VertexVertexMap &predecessors) const
 
void treeFromPredecessorsRecursive (const Vertex &v, QList< Vertex > &vertices, const VertexVertexMap &predecessors) const
 

Static Protected Member Functions

template<typename range_t >
static bool isEmptyRange (const range_t &range)
 
template<typename range_t >
static QList< EdgetoEdgeList (const range_t &range)
 
template<typename Value , typename range_t >
static QList< Value > toList (const range_t &range)
 
template<typename range_t >
static QList< VertextoVertexList (const range_t &range)
 

Protected Attributes

MeaningOfDirection direction
 
GraphContainer graph
 

Member Typedef Documentation

◆ adjacency_iter

template<class VertexProperties , class EdgeProperties >
typedef graph_traits::adjacency_iterator Digikam::Graph< VertexProperties, EdgeProperties >::adjacency_iter
inherited

◆ adjacency_vertex_range_t

template<class VertexProperties , class EdgeProperties >
typedef std::pair<adjacency_iter, adjacency_iter> Digikam::Graph< VertexProperties, EdgeProperties >::adjacency_vertex_range_t
inherited

◆ const_edge_property_map_t

template<class VertexProperties , class EdgeProperties >
typedef boost::property_map<GraphContainer, edge_properties_t>::const_type Digikam::Graph< VertexProperties, EdgeProperties >::const_edge_property_map_t
inherited

◆ const_vertex_index_map_t

template<class VertexProperties , class EdgeProperties >
typedef boost::property_map<GraphContainer, boost::vertex_index_t>::const_type Digikam::Graph< VertexProperties, EdgeProperties >::const_vertex_index_map_t
inherited

◆ const_vertex_property_map_t

template<class VertexProperties , class EdgeProperties >
typedef boost::property_map<GraphContainer, vertex_properties_t>::const_type Digikam::Graph< VertexProperties, EdgeProperties >::const_vertex_property_map_t
inherited

◆ degree_t

template<class VertexProperties , class EdgeProperties >
typedef graph_traits::degree_size_type Digikam::Graph< VertexProperties, EdgeProperties >::degree_t
inherited

◆ edge_iter

template<class VertexProperties , class EdgeProperties >
typedef graph_traits::edge_iterator Digikam::Graph< VertexProperties, EdgeProperties >::edge_iter
inherited

◆ edge_property_map_t

template<class VertexProperties , class EdgeProperties >
typedef boost::property_map<GraphContainer, edge_properties_t>::type Digikam::Graph< VertexProperties, EdgeProperties >::edge_property_map_t
inherited

◆ edge_range_t

template<class VertexProperties , class EdgeProperties >
typedef std::pair<edge_iter, edge_iter> Digikam::Graph< VertexProperties, EdgeProperties >::edge_range_t
inherited

◆ edge_t

template<class VertexProperties , class EdgeProperties >
typedef graph_traits::edge_descriptor Digikam::Graph< VertexProperties, EdgeProperties >::edge_t
inherited

◆ EdgePair

template<class VertexProperties , class EdgeProperties >
typedef QPair<Edge, Edge> Digikam::Graph< VertexProperties, EdgeProperties >::EdgePair
inherited

◆ graph_traits

template<class VertexProperties , class EdgeProperties >
typedef boost::graph_traits<GraphContainer> Digikam::Graph< VertexProperties, EdgeProperties >::graph_traits
inherited

a bunch of graph-specific typedefs that make the long boost types manageable

◆ GraphContainer

template<class VertexProperties , class EdgeProperties >
typedef boost::adjacency_list< boost::vecS, boost::vecS, boost::bidirectionalS, boost::property<boost::vertex_index_t, int, boost::property<vertex_properties_t, VertexProperties> >, boost::property<edge_properties_t, EdgeProperties> > Digikam::Graph< VertexProperties, EdgeProperties >::GraphContainer
inherited

◆ in_edge_iter

template<class VertexProperties , class EdgeProperties >
typedef graph_traits::in_edge_iterator Digikam::Graph< VertexProperties, EdgeProperties >::in_edge_iter
inherited

◆ inv_adjacency_iter

template<class VertexProperties , class EdgeProperties >
typedef boost::inv_adjacency_iterator_generator<GraphContainer, vertex_t, in_edge_iter>::type Digikam::Graph< VertexProperties, EdgeProperties >::inv_adjacency_iter
inherited

◆ inv_adjacency_vertex_range_t

template<class VertexProperties , class EdgeProperties >
typedef std::pair<inv_adjacency_iter, inv_adjacency_iter> Digikam::Graph< VertexProperties, EdgeProperties >::inv_adjacency_vertex_range_t
inherited

◆ out_edge_iter

template<class VertexProperties , class EdgeProperties >
typedef graph_traits::out_edge_iterator Digikam::Graph< VertexProperties, EdgeProperties >::out_edge_iter
inherited

◆ out_edge_range_t

template<class VertexProperties , class EdgeProperties >
typedef std::pair<out_edge_iter, out_edge_iter> Digikam::Graph< VertexProperties, EdgeProperties >::out_edge_range_t
inherited

◆ vertex_index_map_t

template<class VertexProperties , class EdgeProperties >
typedef boost::property_map<GraphContainer, boost::vertex_index_t>::type Digikam::Graph< VertexProperties, EdgeProperties >::vertex_index_map_t
inherited

◆ vertex_iter

template<class VertexProperties , class EdgeProperties >
typedef graph_traits::vertex_iterator Digikam::Graph< VertexProperties, EdgeProperties >::vertex_iter
inherited

◆ vertex_property_map_t

template<class VertexProperties , class EdgeProperties >
typedef boost::property_map<GraphContainer, vertex_properties_t>::type Digikam::Graph< VertexProperties, EdgeProperties >::vertex_property_map_t
inherited

◆ vertex_range_t

template<class VertexProperties , class EdgeProperties >
typedef std::pair<vertex_iter, vertex_iter> Digikam::Graph< VertexProperties, EdgeProperties >::vertex_range_t
inherited

◆ vertex_t

template<class VertexProperties , class EdgeProperties >
typedef graph_traits::vertex_descriptor Digikam::Graph< VertexProperties, EdgeProperties >::vertex_t
inherited

◆ VertexIntMap

template<class VertexProperties , class EdgeProperties >
typedef QMapForAdaptors<Vertex, int> Digikam::Graph< VertexProperties, EdgeProperties >::VertexIntMap
inherited

◆ VertexIntMapAdaptor

template<class VertexProperties , class EdgeProperties >
typedef boost::associative_property_map<VertexIntMap> Digikam::Graph< VertexProperties, EdgeProperties >::VertexIntMapAdaptor
inherited

◆ VertexPair

template<class VertexProperties , class EdgeProperties >
typedef QPair<Vertex, Vertex> Digikam::Graph< VertexProperties, EdgeProperties >::VertexPair
inherited

◆ VertexVertexMap

template<class VertexProperties , class EdgeProperties >
typedef QMapForAdaptors<Vertex, Vertex> Digikam::Graph< VertexProperties, EdgeProperties >::VertexVertexMap
inherited

◆ VertexVertexMapAdaptor

template<class VertexProperties , class EdgeProperties >
typedef boost::associative_property_map<VertexVertexMap> Digikam::Graph< VertexProperties, EdgeProperties >::VertexVertexMapAdaptor
inherited

Member Enumeration Documentation

◆ AdjacencyFlags

template<class VertexProperties , class EdgeProperties >
enum Digikam::Graph::AdjacencyFlags
inherited
Enumerator
OutboundEdges 
InboundEdges 
EdgesToLeaf 

These resolve to one of the flags above, depending on MeaningOfDirection.

EdgesToRoot 
AllEdges 

◆ GraphCopyFlags

template<class VertexProperties , class EdgeProperties >
enum Digikam::Graph::GraphCopyFlags
inherited
Enumerator
CopyVertexProperties 
CopyEdgeProperties 
CopyAllProperties 

◆ ReturnOrder

template<class VertexProperties , class EdgeProperties >
enum Digikam::Graph::ReturnOrder
inherited
Enumerator
BreadthFirstOrder 
DepthFirstOrder 

Constructor & Destructor Documentation

◆ ItemHistoryGraphData() [1/2]

Digikam::ItemHistoryGraphData::ItemHistoryGraphData ( )
inline

◆ ItemHistoryGraphData() [2/2]

Digikam::ItemHistoryGraphData::ItemHistoryGraphData ( const HistoryGraph g)
inlineexplicit

Member Function Documentation

◆ addEdge()

template<class VertexProperties , class EdgeProperties >
Edge Digikam::Graph< VertexProperties, EdgeProperties >::addEdge ( const Vertex v1,
const Vertex v2 
)
inlineinherited

◆ addHistory()

◆ addVertex() [1/6]

template<class VertexProperties , class EdgeProperties >
Vertex Digikam::Graph< VertexProperties, EdgeProperties >::addVertex ( )
inlineinherited

◆ addVertex() [2/6]

◆ addVertex() [3/6]

◆ addVertex() [4/6]

HistoryGraph::Vertex Digikam::ItemHistoryGraphData::addVertex ( const QList< HistoryImageId > &  imageIds)

◆ addVertex() [5/6]

template<class VertexProperties , class EdgeProperties >
Vertex Digikam::Graph< VertexProperties, EdgeProperties >::addVertex ( const VertexProperties &  properties)
inlineinherited

◆ addVertex() [6/6]

HistoryGraph::Vertex Digikam::ItemHistoryGraphData::addVertex ( qlonglong  id)

◆ addVertexScanned()

HistoryGraph::Vertex Digikam::ItemHistoryGraphData::addVertexScanned ( qlonglong  id)

◆ adjacentVertices()

template<class VertexProperties , class EdgeProperties >
QList<Vertex> Digikam::Graph< VertexProperties, EdgeProperties >::adjacentVertices ( const Vertex v,
AdjacencyFlags  flags = AllEdges 
) const
inlineinherited

References Digikam::ParentToChild.

Referenced by Digikam::operator<<().

◆ alwaysFalse()

template<class VertexProperties , class EdgeProperties >
template<typename T >
static bool Digikam::Graph< VertexProperties, EdgeProperties >::alwaysFalse ( const T ,
const T  
)
inlinestaticinherited

◆ applyProperties()

◆ categorize()

◆ clear()

template<class VertexProperties , class EdgeProperties >
void Digikam::Graph< VertexProperties, EdgeProperties >::clear ( )
inlineinherited

◆ copyProperties()

template<class VertexProperties , class EdgeProperties >
void Digikam::Graph< VertexProperties, EdgeProperties >::copyProperties ( Graph< VertexProperties, EdgeProperties > &  other,
GraphCopyFlags  flags,
const std::vector< vertex_t > &  copiedVertices 
) const
inlineprotectedinherited

◆ edge()

template<class VertexProperties , class EdgeProperties >
Edge Digikam::Graph< VertexProperties, EdgeProperties >::edge ( const Vertex v1,
const Vertex v2 
) const
inlineinherited

◆ edgeCount()

template<class VertexProperties , class EdgeProperties >
int Digikam::Graph< VertexProperties, EdgeProperties >::edgeCount ( ) const
inlineinherited

◆ edgeDifference()

template<class VertexProperties , class EdgeProperties >
QList<Edge> Digikam::Graph< VertexProperties, EdgeProperties >::edgeDifference ( const Graph< VertexProperties, EdgeProperties > &  other,
const std::vector< vertex_t > &  copiedVertices 
) const
inlineprotectedinherited

Returns a list of edges of this graph that have been removed in other. copiedVertices maps the vertices of this graph to other.

References Digikam::Graph< VertexProperties, EdgeProperties >::edge(), Digikam::Graph< VertexProperties, EdgeProperties >::Vertex::isNull(), and Digikam::Graph< VertexProperties, EdgeProperties >::Edge::isNull().

◆ edgePairs()

template<class VertexProperties , class EdgeProperties >
QList<VertexPair> Digikam::Graph< VertexProperties, EdgeProperties >::edgePairs ( ) const
inlineinherited

◆ edges() [1/2]

template<class VertexProperties , class EdgeProperties >
QList<Edge> Digikam::Graph< VertexProperties, EdgeProperties >::edges ( ) const
inlineinherited

◆ edges() [2/2]

template<class VertexProperties , class EdgeProperties >
QList<Edge> Digikam::Graph< VertexProperties, EdgeProperties >::edges ( const Vertex v,
AdjacencyFlags  flags = AllEdges 
) const
inlineinherited

◆ findVertexByProperties()

template<class VertexProperties , class EdgeProperties >
template<class T >
Vertex Digikam::Graph< VertexProperties, EdgeProperties >::findVertexByProperties ( const T value) const
inlineinherited

References value.

Referenced by addVertex(), and addVertexScanned().

◆ findZeroDegree()

template<class VertexProperties , class EdgeProperties >
QList<Vertex> Digikam::Graph< VertexProperties, EdgeProperties >::findZeroDegree ( bool  inOrOut) const
inlineprotectedinherited

Finds vertex ids of all vertices with zero in- our out-degree.

◆ findZeroDegreeFrom()

template<class VertexProperties , class EdgeProperties >
QList<Vertex> Digikam::Graph< VertexProperties, EdgeProperties >::findZeroDegreeFrom ( const Vertex v,
bool  inOrOut 
) const
inlineprotectedinherited

◆ getGraph()

template<class VertexProperties , class EdgeProperties >
const GraphContainer& Digikam::Graph< VertexProperties, EdgeProperties >::getGraph ( ) const
inlineinherited

Accessing vertices and edges

◆ hasEdge()

template<class VertexProperties , class EdgeProperties >
bool Digikam::Graph< VertexProperties, EdgeProperties >::hasEdge ( const Vertex v1,
const Vertex v2 
) const
inlineinherited

◆ hasEdges() [1/2]

template<class VertexProperties , class EdgeProperties >
bool Digikam::Graph< VertexProperties, EdgeProperties >::hasEdges ( ) const
inlineinherited

Referenced by categorize().

◆ hasEdges() [2/2]

template<class VertexProperties , class EdgeProperties >
bool Digikam::Graph< VertexProperties, EdgeProperties >::hasEdges ( const Vertex v,
AdjacencyFlags  flags = AllEdges 
) const
inlineinherited

◆ inDegree()

template<class VertexProperties , class EdgeProperties >
int Digikam::Graph< VertexProperties, EdgeProperties >::inDegree ( const Vertex v) const
inlineinherited

◆ isConnected()

template<class VertexProperties , class EdgeProperties >
bool Digikam::Graph< VertexProperties, EdgeProperties >::isConnected ( const Vertex v1,
const Vertex v2 
) const
inlineinherited

Does not care for direction.

◆ isEmpty()

template<class VertexProperties , class EdgeProperties >
bool Digikam::Graph< VertexProperties, EdgeProperties >::isEmpty ( ) const
inlineinherited

◆ isEmptyRange()

template<class VertexProperties , class EdgeProperties >
template<typename range_t >
static bool Digikam::Graph< VertexProperties, EdgeProperties >::isEmptyRange ( const range_t &  range)
inlinestaticprotectedinherited

◆ isLeaf()

template<class VertexProperties , class EdgeProperties >
bool Digikam::Graph< VertexProperties, EdgeProperties >::isLeaf ( const Vertex v) const
inlineinherited

Referenced by categorize().

◆ isRoot()

template<class VertexProperties , class EdgeProperties >
bool Digikam::Graph< VertexProperties, EdgeProperties >::isRoot ( const Vertex v) const
inlineinherited

Referenced by categorize().

◆ leaves()

template<class VertexProperties , class EdgeProperties >
QList<Vertex> Digikam::Graph< VertexProperties, EdgeProperties >::leaves ( ) const
inlineinherited

Returns all leaves, i.e. vertices with no children Takes the graph direction into account.

References Digikam::ParentToChild.

◆ leavesFrom()

template<class VertexProperties , class EdgeProperties >
QList<Vertex> Digikam::Graph< VertexProperties, EdgeProperties >::leavesFrom ( const Vertex v) const
inlineinherited

◆ listPath()

template<class VertexProperties , class EdgeProperties >
QList<Vertex> Digikam::Graph< VertexProperties, EdgeProperties >::listPath ( const Vertex root,
const Vertex target,
const VertexVertexMap predecessors,
MeaningOfDirection  dir = ParentToChild 
) const
inlineprotectedinherited

Get a list of vertex ids for the path from root to target, using the given predecessors. Depending on MeaningOfDirection, the ids are listed inverted, from target to root.

References Digikam::ParentToChild.

◆ longestPathTouching() [1/2]

template<class VertexProperties , class EdgeProperties >
QList<Vertex> Digikam::Graph< VertexProperties, EdgeProperties >::longestPathTouching ( const Vertex v) const
inlineinherited

Returns the longest path through the graph, starting from a vertex in roots(), ending on a vertex in leaves(), and passing vertex v. The returned list is given in that order, root - v - leave. If there is more than one candidate for root or leave, lessThan is used to determine the first candidate.

◆ longestPathTouching() [2/2]

template<class VertexProperties , class EdgeProperties >
template<typename LessThan >
QList<Vertex> Digikam::Graph< VertexProperties, EdgeProperties >::longestPathTouching ( const Vertex v,
LessThan  lessThan 
) const
inlineinherited

◆ meaningOfDirection()

template<class VertexProperties , class EdgeProperties >
MeaningOfDirection Digikam::Graph< VertexProperties, EdgeProperties >::meaningOfDirection ( ) const
inlineinherited

◆ mostRemoteNodes()

template<class VertexProperties , class EdgeProperties >
QList<Vertex> Digikam::Graph< VertexProperties, EdgeProperties >::mostRemoteNodes ( const VertexIntMap distances) const
inlineprotectedinherited

Get the list of vertices with the largest value in the given distance map

◆ operator=()

ItemHistoryGraphData& Digikam::ItemHistoryGraphData::operator= ( const HistoryGraph g)
inline

◆ outDegree()

template<class VertexProperties , class EdgeProperties >
int Digikam::Graph< VertexProperties, EdgeProperties >::outDegree ( const Vertex v) const
inlineinherited

Referenced by Digikam::operator<<().

◆ properties() [1/5]

template<class VertexProperties , class EdgeProperties >
EdgeProperties& Digikam::Graph< VertexProperties, EdgeProperties >::properties ( const Edge e)
inlineinherited

References edge_properties.

◆ properties() [2/5]

template<class VertexProperties , class EdgeProperties >
const EdgeProperties& Digikam::Graph< VertexProperties, EdgeProperties >::properties ( const Edge e) const
inlineinherited

References edge_properties.

◆ properties() [3/5]

template<class VertexProperties , class EdgeProperties >
VertexProperties& Digikam::Graph< VertexProperties, EdgeProperties >::properties ( const Vertex v)
inlineinherited

References vertex_properties.

◆ properties() [4/5]

template<class VertexProperties , class EdgeProperties >
const VertexProperties& Digikam::Graph< VertexProperties, EdgeProperties >::properties ( const Vertex v) const
inlineinherited

◆ properties() [5/5]

template<class VertexProperties , class EdgeProperties >
EdgeProperties Digikam::Graph< VertexProperties, EdgeProperties >::properties ( const Vertex v1,
const Vertex v2 
) const
inlineinherited

◆ remove()

template<class VertexProperties , class EdgeProperties >
void Digikam::Graph< VertexProperties, EdgeProperties >::remove ( const Vertex v)
inlineinherited

◆ removeNextUnresolvedVertex()

◆ roots()

template<class VertexProperties , class EdgeProperties >
QList<Vertex> Digikam::Graph< VertexProperties, EdgeProperties >::roots ( ) const
inlineinherited

Returns all roots, i.e. vertices with no parents. Takes the graph direction into account.

References Digikam::ParentToChild.

◆ rootsOf()

template<class VertexProperties , class EdgeProperties >
QList<Vertex> Digikam::Graph< VertexProperties, EdgeProperties >::rootsOf ( const Vertex v) const
inlineinherited

Returns all roots of vertex v. Subset of roots(). I case any leaves have roots that are not roots of v, they will not be contained in this list.

References Digikam::ParentToChild.

◆ setProperties() [1/2]

template<class VertexProperties , class EdgeProperties >
void Digikam::Graph< VertexProperties, EdgeProperties >::setProperties ( const Edge e,
const EdgeProperties &  props 
)
inlineinherited

References edge_properties.

◆ setProperties() [2/2]

template<class VertexProperties , class EdgeProperties >
void Digikam::Graph< VertexProperties, EdgeProperties >::setProperties ( const Vertex v,
const VertexProperties &  props 
)
inlineinherited

◆ shortestDistancesFrom()

template<class VertexProperties , class EdgeProperties >
QMap<Vertex, int> Digikam::Graph< VertexProperties, EdgeProperties >::shortestDistancesFrom ( const Vertex v) const
inlineinherited

Returns the shortest distances from Vertex to all vertices in the graph. If the value is -1, a vertex is not reachable from v.

References Digikam::Graph< VertexProperties, EdgeProperties >::Path::distances, Digikam::ParentToChild, and Digikam::Graph< VertexProperties, EdgeProperties >::Path::shortestPath().

◆ shortestPath()

template<class VertexProperties , class EdgeProperties >
QList<Vertex> Digikam::Graph< VertexProperties, EdgeProperties >::shortestPath ( const Vertex v1,
const Vertex v2 
) const
inlineinherited

Returns the shortestPath between id1 and id2. If s2 is not reachable from s1, the path is searched from s2 to s1. The returned list always starts with s1, contains the intermediate vertices, and ends with s2. If no path is available, an empty list is returned.

References Digikam::ChildToParent, Digikam::Graph< VertexProperties, EdgeProperties >::Vertex::isNull(), Digikam::Graph< VertexProperties, EdgeProperties >::Path::isReachable(), Digikam::Graph< VertexProperties, EdgeProperties >::Path::predecessors, and Digikam::Graph< VertexProperties, EdgeProperties >::Path::shortestPath().

◆ source()

template<class VertexProperties , class EdgeProperties >
Vertex Digikam::Graph< VertexProperties, EdgeProperties >::source ( const Edge e) const
inlineinherited

◆ target()

template<class VertexProperties , class EdgeProperties >
Vertex Digikam::Graph< VertexProperties, EdgeProperties >::target ( const Edge e) const
inlineinherited

◆ toEdgeList()

template<class VertexProperties , class EdgeProperties >
template<typename range_t >
static QList<Edge> Digikam::Graph< VertexProperties, EdgeProperties >::toEdgeList ( const range_t &  range)
inlinestaticprotectedinherited

◆ toInfoList()

QList<ItemInfo> Digikam::ItemHistoryGraphData::toInfoList ( const QList< Vertex > &  vertices) const
inline

◆ toList()

template<class VertexProperties , class EdgeProperties >
template<typename Value , typename range_t >
static QList<Value> Digikam::Graph< VertexProperties, EdgeProperties >::toList ( const range_t &  range)
inlinestaticprotectedinherited

Returns a list of vertex ids of vertices in the given range

◆ topologicalSort()

template<class VertexProperties , class EdgeProperties >
QList<Vertex> Digikam::Graph< VertexProperties, EdgeProperties >::topologicalSort ( ) const
inlineinherited

Returns the vertex ids of this graph, in topological order.

Referenced by Digikam::operator<<().

◆ toVertexList()

template<class VertexProperties , class EdgeProperties >
template<typename range_t >
static QList<Vertex> Digikam::Graph< VertexProperties, EdgeProperties >::toVertexList ( const range_t &  range)
inlinestaticprotectedinherited

◆ transitiveClosure()

template<class VertexProperties , class EdgeProperties >
Graph Digikam::Graph< VertexProperties, EdgeProperties >::transitiveClosure ( GraphCopyFlags  flags = CopyAllProperties) const
inlineinherited

Returns a copy of this graph with all edges added to form the transitive closure

References Digikam::Graph< VertexProperties, EdgeProperties >::graph.

◆ transitiveReduction()

template<class VertexProperties , class EdgeProperties >
Graph Digikam::Graph< VertexProperties, EdgeProperties >::transitiveReduction ( QList< Edge > *  removedEdges = 0,
GraphCopyFlags  flags = CopyAllProperties 
) const
inlineinherited

Returns a copy of this graph, with edges removed so that the transitive reduction is formed. Optionally, a list of edges of this graph that have been removed in the returned graph is given.

References Digikam::Graph< VertexProperties, EdgeProperties >::graph.

◆ treeFromPredecessors()

template<class VertexProperties , class EdgeProperties >
QList<Vertex> Digikam::Graph< VertexProperties, EdgeProperties >::treeFromPredecessors ( const Vertex v,
const VertexVertexMap predecessors 
) const
inlineprotectedinherited

◆ treeFromPredecessorsRecursive()

template<class VertexProperties , class EdgeProperties >
void Digikam::Graph< VertexProperties, EdgeProperties >::treeFromPredecessorsRecursive ( const Vertex v,
QList< Vertex > &  vertices,
const VertexVertexMap predecessors 
) const
inlineprotectedinherited

◆ vertexCount()

template<class VertexProperties , class EdgeProperties >
int Digikam::Graph< VertexProperties, EdgeProperties >::vertexCount ( ) const
inlineinherited

NOTE: for "hasAdjacentVertices", simply use hasEdges(v, flags)

◆ vertices()

template<class VertexProperties , class EdgeProperties >
QList<Vertex> Digikam::Graph< VertexProperties, EdgeProperties >::vertices ( ) const
inlineinherited

◆ verticesBreadthFirst()

template<class VertexProperties , class EdgeProperties >
QList<Vertex> Digikam::Graph< VertexProperties, EdgeProperties >::verticesBreadthFirst ( const Vertex givenRef = Vertex()) const
inlineinherited

Orders all vertices of the graph in a breadth-first manner. A single vertex is taken as reference to distinguish main root and side paths. Otherwise the first root is taken as reference.

References Digikam::Graph< VertexProperties, EdgeProperties >::GraphSearch::breadthFirstSearch(), Digikam::ChildToParent, Digikam::Graph< VertexProperties, EdgeProperties >::Vertex::isNull(), and Digikam::Graph< VertexProperties, EdgeProperties >::GraphSearch::vertices.

◆ verticesDepthFirstSorted()

template<class VertexProperties , class EdgeProperties >
template<typename LessThan >
QList<Vertex> Digikam::Graph< VertexProperties, EdgeProperties >::verticesDepthFirstSorted ( const Vertex givenRef,
LessThan  lessThan 
) const
inlineinherited

Orders all vertices of the graph in a depth-first manner. When discovering a vertex, the adjacent vertices are sorted with the given lessThan. A single vertex is taken as starting point. If null, the first root is taken as reference.

References Digikam::ChildToParent, Digikam::Graph< VertexProperties, EdgeProperties >::GraphSearch::depthFirstSearchSorted(), Digikam::Graph< VertexProperties, EdgeProperties >::Vertex::isNull(), and Digikam::Graph< VertexProperties, EdgeProperties >::GraphSearch::vertices.

◆ verticesDominatedBy() [1/2]

template<class VertexProperties , class EdgeProperties >
QList<Vertex> Digikam::Graph< VertexProperties, EdgeProperties >::verticesDominatedBy ( const Vertex v,
const Vertex root,
const QList< Vertex > &  presortedVertices 
) const
inlineinherited

For a vertex v reachable from a vertex root returns all vertices dominated by v starting from root. The order is the same as in the given, sorted list of all vertices in this graph (or all vertices expected to be returned. The returned list is the intersection of the dominated vertices and presortedVertices, in order of presortedVertices)

remove all vertices from the DFS of v that are not in the dominated tree

References Digikam::Graph< VertexProperties, EdgeProperties >::DominatorTree::enter(), Digikam::Graph< VertexProperties, EdgeProperties >::Vertex::isNull(), and Digikam::Graph< VertexProperties, EdgeProperties >::DominatorTree::predecessors.

◆ verticesDominatedBy() [2/2]

template<class VertexProperties , class EdgeProperties >
QList<Vertex> Digikam::Graph< VertexProperties, EdgeProperties >::verticesDominatedBy ( const Vertex v,
const Vertex root,
ReturnOrder  order = BreadthFirstOrder 
) const
inlineinherited

◆ verticesDominatedByDepthFirstSorted()

template<class VertexProperties , class EdgeProperties >
template<typename LessThan >
QList<Vertex> Digikam::Graph< VertexProperties, EdgeProperties >::verticesDominatedByDepthFirstSorted ( const Vertex v,
const Vertex root,
LessThan  lessThan 
) const
inlineinherited

For a vertex v reachable from a vertex root all vertices dominated by v starting from root. The returned list is in depth-first order, using root as starting point, and when discovering a vertex, sorting the adjacent vertices with the given lessThan.

Member Data Documentation

◆ direction

template<class VertexProperties , class EdgeProperties >
MeaningOfDirection Digikam::Graph< VertexProperties, EdgeProperties >::direction
protectedinherited

◆ graph


The documentation for this class was generated from the following files: