AliceVision
Photogrammetric Computer Vision Framework
Classes | Public Types | Public Member Functions | Protected Attributes | List of all members
aliceVision::MaxFlow_AdjList Class Reference

Maxflow computation based on a standard Adjacency List graph representation. More...

#include <graphcut.hpp>

Classes

struct  Edge
 

Public Types

using NodeType = int
 
using ValueType = float
 
using Traits = boost::adjacency_list_traits< boost::vecS, boost::vecS, boost::directedS, boost::vecS >
 
using edge_descriptor = typename Traits::edge_descriptor
 
using vertex_descriptor = typename Traits::vertex_descriptor
 
using vertex_size_type = typename Traits::vertices_size_type
 
using Graph = boost::adjacency_list< boost::vecS, boost::vecS, boost::directedS, boost::no_property, Edge, boost::no_property, boost::vecS >
 
using VertexIterator = typename boost::graph_traits< Graph >::vertex_iterator
 

Public Member Functions

 MaxFlow_AdjList (size_t numNodes)
 
void addNodeToSource (NodeType n, ValueType source)
 
void addNodeToSink (NodeType n, ValueType sink)
 
void addEdge (NodeType n1, NodeType n2, ValueType capacity, ValueType reverseCapacity)
 
void printStats () const
 
void printColorStats () const
 
ValueType compute ()
 
bool isSource (NodeType n) const
 is empty
 
bool isTarget (NodeType n) const
 is full
 

Protected Attributes

Graph _graph
 
std::vector< boost::default_color_type > _color
 
const NodeType _S
 
const NodeType _T
 

Detailed Description

Maxflow computation based on a standard Adjacency List graph representation.

See also
MaxFlow_CSR which use less memory.

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