Nifty C++ API Reference

Highly experimental documentation of C++ classes. This documentation is generated by using doxygen and sphinx in conjunction with breathe.

struct AccOptions

Public Functions

AccOptions()
AccOptions(const double minV, const double maxV)

Public Members

const bool setMinMax
const double minVal
const double maxVal
class AdjacencyIter

Inherits from boost::iterator_facade< AdjacencyIter, NodeAdjacency, std::random_access_iterator_tag, const NodeAdjacency & >

Public Functions

template<>
AdjacencyIter(const AGridGraphAdjacencyIter &iter)
template<>
bool equal(const AdjacencyIter &other) const
template<>
void increment()
template<>
void dencrement()
template<>
void advance(const std::size_t n)
template<>
std::ptrdiff_t distance_to(const AdjacencyIter &other) const
template<>
const NodeAdjacency &dereference() const

Private Members

template<>
AGridGraphAdjacencyIter iter_
template<>
NodeAdjacency adjacency_
template <class _CHILD_GRAPH>
struct AdjacencyIterRange

Inherits from nifty::tools::ConstIteratorRange< _CHILD_GRAPH::AdjacencyOutIter >

struct AdjacencyIterRange

Inherits from nifty::tools::ConstIteratorRange< AdjacencyIter >

template <class _CHILD_GRAPH>
struct AdjacencyIterRange

Inherits from nifty::tools::ConstIteratorRange< _CHILD_GRAPH::AdjacencyIter >

struct AdjacencyTag
template <class CLUSTER_POLICY>
class AgglomerativeClustering

Public Types

typedef CLUSTER_POLICY ClusterPolicyType
typedef ClusterPolicyType::EdgeContractionGraphType::WithEdgeUfd WithEdgeUfd
typedef ClusterPolicyType::GraphType GraphType
typedef ClusterPolicyType::EdgeContractionGraphType EdgeContractionGraphType

Public Functions

AgglomerativeClustering(ClusterPolicyType &clusterPolicy)
void run(const bool verbose = false, const uint64_t printNth = 100)
template <class VISITOR>
void run(VISITOR &visitor, const bool verbose = false, const uint64_t printNth = 100)
template <class MERGE_TIMES, class EDGE_DENDROGRAM_HEIGHT>
void runAndGetMergeTimesAndDendrogramHeight(MERGE_TIMES &mergeTimes, EDGE_DENDROGRAM_HEIGHT &dendrogramHeight, const bool verbose = false)
template <class MERGE_TIMES>
void runAndGetMergeTimes(MERGE_TIMES &mergeTimes, const bool verbose = false)
template <class EDGE_DENDROGRAM_HEIGHT>
void runAndGetDendrogramHeight(EDGE_DENDROGRAM_HEIGHT &dendrogramHeight, const bool verbose = false)
template <class EDGE_MAP>
void ucmTransform(EDGE_MAP &edgeMap) const
template <class EDGE_MAP, class EDGE_MAP_OUT>
void ucmTransform(const EDGE_MAP &edgeMap, EDGE_MAP_OUT &edgeMapOut) const
const ClusterPolicyType &clusterPolicy() const
const GraphType &graph() const
template <class NODE_MAP>
void result(NODE_MAP &nodeMap) const

Private Members

ClusterPolicyType &clusterPolicy_
template <unsigned DIM>
struct ApplyFilters

Public Types

typedef std::conditional<DIM==2, fastfilters_array2d_t, fastfilters_array3d_t>::type FastfiltersArrayType
typedef array::StaticArray<int64_t, DIM+1> Coord

Public Functions

ApplyFilters(const std::vector<double> &sigmas, const std::vector<FilterBase *> filters)
void operator()(const marray::View<float> &in, marray::View<float> &out) const
void operator()(const marray::View<float> &in, marray::View<float> &out, parallel::ThreadPool &threadpool) const
size_t numberOfChannels() const

Private Members

std::vector<double> sigmas_
std::vector<FilterBase *> filters_
template <class _CHILD_GRAPH>
struct ArcIterRange

Inherits from nifty::tools::ConstIteratorRange< _CHILD_GRAPH::ArcIter >

struct ArcTag
template <class G, class T>
class ArithmeticMeanEdgeMap

Public Types

typedef G GraphType
typedef GraphType:: template EdgeMap<T> nifty::graph::agglo::merge_rules::ArithmeticMeanEdgeMap::MeanEdgeMapType
typedef GraphType:: template EdgeMap<nifty::float16_t> nifty::graph::agglo::merge_rules::ArithmeticMeanEdgeMap::SizeEdgeMapType
typedef ArithmeticMeanSettings SettingsType

Public Functions

auto name() const
template <class VALUES, class WEIGHTS>
ArithmeticMeanEdgeMap(const GraphType &g, const VALUES &values, const WEIGHTS &weights, const SettingsType &settings = SettingsType ())
void merge(const uint64_t aliveEdge, const uint64_t deadEdge)
void setValueFrom(const uint64_t targetEdge, const uint64_t sourceEdge)
void setFrom(const uint64_t targetEdge, const uint64_t sourceEdge)
void set(const uint64_t targetEdge, const T &value, const T &weight)
T operator[](const uint64_t edge) const

Public Static Functions

static auto staticName()

Private Members

MeanEdgeMapType values_
SizeEdgeMapType weights_
struct ArithmeticMeanSettings

Public Functions

auto name() const
template <typename ArrayType, typename Value, bool Resizable, size_t Size = 0>
struct array_caster_

Public Types

template<>
using value_conv = make_caster<Value>

Public Functions

bool load(handle src, bool convert)
pybind11::detail::array_caster_::PYBIND11_TYPE_CASTER(ArrayType, _("List[")+value_conv::name()+_< Resizable >(_(""), _("[")+_< Size >()+_("]"))+_("]"))

Public Static Functions

static handle cast(const ArrayType &src, return_value_policy policy, handle parent)

Private Functions

template <bool R = Resizable>
bool require_size(enable_if_t<R, size_t> size)
template <bool R = Resizable>
bool require_size(enable_if_t<!R, size_t> size)
template <class ARRAY_CLASS>
class ArrayExtender

Inherits from ARRAY_CLASS

template <class GRAPH>
class BidirectionalBreadthFirstSearch

Public Types

typedef GRAPH GraphType
typedef GraphType:: template NodeMap<int64_t> nifty::graph::BidirectionalBreadthFirstSearch::Parents

Public Functions

BidirectionalBreadthFirstSearch(const GraphType &graph)
bool runSingleSourceSingleTarget(const int64_t source, const int64_t target)
template <class SUBGRAPH_MASK>
bool runSingleSourceSingleTarget(const int64_t source, const int64_t target, const SUBGRAPH_MASK &mask)
const DequeType &path() const

Private Types

enum RetFlag

Values:

ReturnTrue
ReturnFalse
ContinueSeach
typedef std::deque<uint64_t> DequeType

Private Members

const GraphType &graph_
Parents parents_
std::array<std::queue<uint64_t>, 2> queues_
DequeType path_
template <typename T, typename U>
struct binary_specialized

Public Static Functions

static expr fmin(float x, float y)
static expr fmax(float x, float y)
template <>
template<>
struct binary_specialized<half, half>

Public Static Functions

static half fmin(half x, half y)
static half fmax(half x, half y)
struct binary_t
template <typename T>
struct bits

Subclassed by half_float::detail::bits< const T >, half_float::detail::bits< const volatile T >, half_float::detail::bits< volatile T >

Public Types

typedef unsigned char type
template <typename T>
template<>
struct bits<const T>

Inherits from half_float::detail::bits< T >

template <typename T>
template<>
struct bits<volatile const T>

Inherits from half_float::detail::bits< T >

template <>
template<>
struct bits<double>

Public Types

typedef unsigned long type
template <>
template<>
struct bits<float>

Inherits from half_float::detail::conditional< std::numeric_limits< unsigned int >::digits >, unsigned int, unsigned long

template <typename T>
template<>
struct bits<volatile T>

Inherits from half_float::detail::bits< T >

template <std::size_t DIM, class T = int64_t>
class Block

Public Types

typedef T ValueType
typedef ValueType value_type
typedef nifty::array::StaticArray<ValueType, DIM> VectorType

Public Functions

Block(const VectorType &begin = VectorType (0), const VectorType &end = VectorType (0))
const VectorType &begin() const
const VectorType &end() const
VectorType shape() const

Private Members

VectorType begin_
VectorType end_
template <std::size_t DIM, class T = int64_t>
class Blocking

Public Types

typedef BlockWithHalo<DIM, T> BlockWithHaloType
typedef BlockWithHaloType::BlockType BlockType
typedef BlockWithHaloType::ValueType ValueType
typedef BlockWithHaloType::ValueType value_type
typedef BlockWithHaloType::VectorType VectorType

Public Functions

Blocking(const VectorType &roiBegin, const VectorType &roiEnd, const VectorType &blockShape, const VectorType &blockShift = VectorType (0))
const VectorType &roiBegin() const
const VectorType &roiEnd() const
const VectorType &blockShape() const
const VectorType &blockShift() const
const VectorType &blocksPerAxis() const
const size_t numberOfBlocks() const
BlockType getBlock(const uint64_t blockIndex) const
BlockWithHaloType getBlockWithHalo(const uint64_t blockIndex, const VectorType &haloBegin, const VectorType &haloEnd) const
BlockWithHaloType getBlockWithHalo(const uint64_t blockIndex, const VectorType &halo) const
BlockWithHaloType addHalo(const BlockType innerBlock, const VectorType &haloBegin, const VectorType &haloEnd) const
BlockWithHaloType addHalo(const BlockType innerBlock, const VectorType &halo) const

Private Members

VectorType roiBegin_
VectorType roiEnd_
VectorType blockShape_
VectorType blockShift_
VectorType blocksPerAxis_
VectorType blocksPerAxisStrides_
size_t numberOfBlocks_
template <class OBJECTIVE>
class BlockMulticut

Inherits from nifty::graph::opt::multicut::MulticutBase< OBJECTIVE >

Public Types

typedef OBJECTIVE ObjectiveType
typedef ObjectiveType::WeightType WeightType
typedef MulticutBase<ObjectiveType> BaseType
typedef BaseType::VisitorBaseType VisitorBaseType
typedef BaseType::VisitorProxy VisitorProxy
typedef BaseType::EdgeLabels EdgeLabels
typedef BaseType::NodeLabelsType NodeLabelsType
typedef ObjectiveType::GraphType GraphType
typedef ObjectiveType::GraphType GraphType
typedef ObjectiveType::WeightsMap WeightsMap
typedef GraphType:: template EdgeMap<uint8_t> nifty::graph::opt::multicut::BlockMulticut::IsDirtyEdge
typedef MulticutFactoryBase<ObjectiveType> McFactoryBase

Public Functions

virtual ~BlockMulticut()
BlockMulticut(const ObjectiveType &objective, const SettingsType &settings = SettingsType ())
void optimize(NodeLabels &nodeLabels, VisitorBaseType *visitor)
const BlockMulticut<OBJECTIVE>::ObjectiveType &objective() const
virtual const NodeLabels &currentBestNodeLabels()
virtual std::string name() const
virtual void weightsChanged()
virtual double currentBestEnergy()

Private Members

const ObjectiveType &objective_
SettingsType settings_
NodeLabels *currentBest_
double currentBestEnergy_
template <class T>
class BlockStorage

Public Types

typedef nifty::marray::Marray<T> ArrayType
typedef nifty::marray::View<T> ViewType

Public Functions

template <class SHAPE>
BlockStorage(const SHAPE &maxShape, const std::size_t numberOfBlocks)
template <class SHAPE>
BlockStorage(nifty::parallel::ThreadPool &threadpool, const SHAPE &maxShape, const std::size_t numberOfBlocks)
template <class SHAPE>
ViewType getView(const SHAPE &shape, const std::size_t blockIndex)
ViewType getView(const std::size_t blockIndex)

Private Members

std::vector<uint64_t> zeroCoord_
std::vector<ArrayType> arrayVec_
template <class ARRAY>
struct BlockStorageSelector
template <class T>
template<>
struct BlockStorageSelector<hdf5::Hdf5Array<T>>

Public Types

typedef BlockStorage<T> type
template <class T, class A>
template<>
struct BlockStorageSelector<marray::Marray<T, A>>

Public Types

typedef BlockView<T> type
template <class T, size_t DIM, bool AUTO_CAST_TYPE>
template<>
struct BlockStorageSelector<marray::PyView<T, DIM, AUTO_CAST_TYPE>>

Public Types

typedef BlockView<T> type
template <class T, bool C, class A>
template<>
struct BlockStorageSelector<marray::View<T, C, A>>

Public Types

typedef BlockView<T> type
template <class T>
class BlockView

Public Types

typedef nifty::marray::View<T> ViewType

Public Functions

template <class SHAPE>
BlockView(const SHAPE &maxShape, const std::size_t numberOfBlocks)
template <class SHAPE>
BlockView(nifty::parallel::ThreadPool &threadpool, const SHAPE &maxShape, const std::size_t numberOfBlocks)
ViewType getView(const std::size_t blockIndex)
template <class SHAPE>
ViewType getView(const SHAPE &shape, const std::size_t blockIndex)
template <std::size_t DIM, class T = int64_t>
class BlockWithHalo

Public Types

typedef Block<DIM, T> BlockType
typedef BlockType::ValueType ValueType
typedef BlockType::ValueType value_type
typedef BlockType::VectorType VectorType

Public Functions

BlockWithHalo(const BlockType &outerBlock = BlockType (), const BlockType &innerBlock = BlockType ())
const BlockType &outerBlock() const
const BlockType &innerBlock() const
const BlockType &innerBlockLocal() const

Private Members

BlockType outerBlock_
BlockType innerBlock_
BlockType innerBlockLocal_
template <bool>
struct bool_type

Subclassed by half_float::detail::is_float< typename >, half_float::detail::is_float< double >, half_float::detail::is_float< float >, half_float::detail::is_float< long double >, half_float::detail::is_float< T >

template <size_t DIM>
class Bounds
template <>
template<>
class Bounds<2>

Public Types

typedef array::StaticArray<uint32_t, 2> CoordinateType
typedef array::StaticArray<int64_t, 2> SignedCoordinateType
typedef TopologicalGrid<2> TopologicalGridType

Public Functions

Bounds(const TopologicalGridType &tGrid)
template <size_t CELL_TYPE>
const CellBoundsVector<2, CELL_TYPE> &bounds() const

Private Members

std::tuple<CellBoundsVector<2, 0>, CellBoundsVector<2, 1>> bounds_
struct CacheSettings

Public Functions

CacheSettings(const int hashTabelSize_ = 977, const int nBytes_ = 36000000, const float rddc_ = 1.0)

Public Members

int hashTabelSize
int nBytes
float rddc
template <class OBJECTIVE>
class CcFusionMoveBased

Inherits from nifty::graph::opt::common::detail_cc_fusion::CcFusionMoveBasedImpl< OBJECTIVE, MulticutBase< OBJECTIVE >, FusionMove< OBJECTIVE > >

Public Types

typedef OBJECTIVE ObjectiveType
typedef nifty::graph::opt::common::detail_cc_fusion::CcFusionMoveBasedImpl<OBJECTIVE, MulticutBase<OBJECTIVE>, FusionMove<OBJECTIVE>> BaseType
typedef BaseType::SettingsType SettingsType

Public Functions

virtual ~CcFusionMoveBased()
CcFusionMoveBased(const ObjectiveType &objective, const SettingsType &settings = SettingsType ())
template <class OBJECTIVE, class SOLVER_BASE, class FUSION_MOVE>
class CcFusionMoveBasedImpl

Inherits from SOLVER_BASE

Public Types

typedef OBJECTIVE ObjectiveType
typedef SOLVER_BASE BaseType
typedef ObjectiveType::GraphType GraphType
typedef BaseType::VisitorBaseType VisitorBaseType
typedef BaseType::VisitorProxyType VisitorProxyType
typedef BaseType::NodeLabelsType NodeLabelsType
typedef nifty::graph::opt::common::ProposalGeneratorBase<ObjectiveType> ProposalGeneratorBaseType
typedef nifty::graph::opt::common::ProposalGeneratorFactoryBase<ObjectiveType> ProposalGeneratorFactoryBaseType

Public Functions

~CcFusionMoveBasedImpl()
CcFusionMoveBasedImpl(const ObjectiveType &objective, const SettingsType &settings = SettingsType ())
void optimize(NodeLabelsType &nodeLabels, VisitorBaseType *visitor)
const CcFusionMoveBasedImpl<OBJECTIVE, SOLVER_BASE, FUSION_MOVE>::ObjectiveType &objective() const
virtual const NodeLabelsType &currentBestNodeLabels()
virtual std::string name() const

Private Types

typedef FUSION_MOVE FusionMoveType
typedef FusionMoveType::SettingsType FusionMoveSettingsType

Private Functions

void optimizeSingleThread(VisitorProxyType &visitorProxy)
void optimizeMultiThread(VisitorProxyType &visitorProxy)

Private Members

const ObjectiveType &objective_
SettingsType settings_
const GraphType &graph_
NodeLabelsType *currentBest_
double currentBestEnergy_
nifty::parallel::ParallelOptions parallelOptions_
nifty::parallel::ThreadPool threadPool_
ProposalGeneratorBaseType *proposalGenerator_
std::vector<FusionMoveType *> fusionMoves_
std::vector<NodeLabelsType *> solBufferIn_
std::vector<NodeLabelsType *> solBufferOut_
class Cell1BasicGeometricFeatures2D

Public Functions

Cell1BasicGeometricFeatures2D()
size_t numberOfFeatures() const
std::vector<std::string> names() const
template <class T>
void operator()(const CellGeometryVector<2, 1> &cell1GeometryVector, const CellGeometryVector<2, 2> &cell2GeometryVector, const CellBoundsVector<2, 1> &cell1BoundsVector, nifty::marray::View<T> &features) const

Private Types

typedef nifty::features::DefaultAccumulatedStatistics<float> AccType

Private Members

std::vector<size_t> dists_
class Cell1BasicTopologicalFeatures

Public Functions

Cell1BasicTopologicalFeatures()
size_t numberOfFeatures() const
std::vector<std::string> names() const
template <class T>
void operator()(const CellBoundsVector<2, 0> &cell0BoundsVector, const CellBoundsVector<2, 1> &cell1BoundsVector, const CellBoundedByVector<2, 1> &cell1BoundedByVector, const CellBoundedByVector<2, 2> &cell2BoundedByVector, nifty::marray::View<T> &features) const

Private Members

std::vector<size_t> dists_
class Cell1CurvatureFeatures2D

Public Functions

Cell1CurvatureFeatures2D(const std::vector<float> &sigmas = std::vector< float >({1.0f, 2.0f, 4.0f}))
size_t numberOfFeatures() const
std::vector<std::string> names() const
template <class T>
void operator()(const CellGeometryVector<2, 1> &cell1GeometryVector, const CellBoundedByVector<2, 1> &cell1BoundedByVector, nifty::marray::View<T> &features) const

Private Types

typedef nifty::features::DefaultAccumulatedStatistics<float> AccType

Private Members

std::vector<float> sigmas_
class Cell1LineSegmentDist2D

Public Functions

Cell1LineSegmentDist2D(const std::vector<size_t> &dists = std::vector< size_t >({size_t(3), size_t(5), size_t(7)}))
size_t numberOfFeatures() const
std::vector<std::string> names() const
template <class T>
void operator()(const CellGeometryVector<2, 1> &cell1GeometryVector, nifty::marray::View<T> &features) const

Private Types

typedef nifty::features::DefaultAccumulatedStatistics<float> AccType

Private Members

std::vector<size_t> dists_
template <size_t DIM, size_t CELL_TYPE>
class CellBoundedBy
template <>
template<>
class CellBoundedBy<2, 1>

Public Functions

CellBoundedBy()
uint32_t size() const
const uint32_t &operator[](const size_t i) const

Private Members

template<>
uint32_t data_[2]

Friends

friend nifty::cgp::CellBoundedBy< 2, 1 >::CellBoundedByVector< 2, 1 >
template <>
template<>
class CellBoundedBy<2, 2>

Public Functions

CellBoundedBy()
uint32_t size() const
const uint32_t &operator[](const size_t i) const

Private Members

std::vector<uint32_t> data_

Friends

friend nifty::cgp::CellBoundedBy< 2, 2 >::CellBoundedByVector< 2, 2 >
template <size_t DIM, size_t CELL_TYPE>
class CellBoundedByVector
template <>
template<>
class CellBoundedByVector<2, 1>

Inherits from std::vector< CellBoundedBy< 2, 1 > >

Public Types

typedef std::vector<CellBoundedBy<2, 1>> BaseType

Public Functions

CellBoundedByVector(const CellBoundsVector<2, 0> &cell0Bounds)
template <>
template<>
class CellBoundedByVector<2, 2>

Inherits from std::vector< CellBoundedBy< 2, 2 > >

Public Types

typedef std::vector<CellBoundedBy<2, 2>> BaseType

Public Functions

CellBoundedByVector(const CellBoundsVector<2, 1> &cell1Bounds)
template <size_t DIM, size_t CELL_TYPE>
class CellBounds
template <>
template<>
class CellBounds<2, 0>

Public Functions

CellBounds(const uint32_t a = 0, const uint32_t b = 0, const uint32_t c = 0, const uint32_t d = 0)
uint32_t size() const
const uint32_t &operator[](const unsigned int i) const

Private Members

template<>
uint32_t data_[4]
template <>
template<>
class CellBounds<2, 1>

Public Functions

CellBounds(const uint32_t a = 0, const uint32_t b = 0)
uint32_t size() const
const uint32_t &operator[](const unsigned int i) const

Private Members

template<>
uint32_t data_[2]
template <size_t DIM, size_t CELL_TYPE>
class CellBoundsVector

Inherits from std::vector< CellBounds< DIM, CELL_TYPE > >

Public Types

typedef array::StaticArray<uint32_t, DIM +1> NumberOfCellsType
typedef std::vector<CellBounds<DIM, CELL_TYPE>> BaseType

Public Functions

const NumberOfCellsType &numberOfCells() const

Private Members

NumberOfCellsType numberOfCells_

Friends

friend nifty::cgp::CellBoundsVector::Bounds< DIM >
template <size_t DIM, size_t CELL_TYPE>
class CellGeometry

Inherits from std::vector< array::StaticArray< uint32_t, DIM > >

Public Types

typedef std::integral_constant<size_t, DIM> DimensionType
typedef nifty::array::StaticArray<uint32_t, DIM> CoordinateType
typedef nifty::array::StaticArray<float, DIM> FloatCoordinateType
typedef std::vector<CoordinateType> BaseType

Public Functions

FloatCoordinateType centerOfMass() const
template <>
template<>
class CellGeometry<2, 1>

Inherits from std::vector< array::StaticArray< uint32_t, 2 > >

Public Types

typedef std::integral_constant<size_t, DIM> DimensionType
typedef nifty::array::StaticArray<uint32_t, DIM> CoordinateType
typedef nifty::array::StaticArray<float, DIM> FloatCoordinateType
typedef std::vector<CoordinateType> BaseType

Public Functions

CellGeometry()
FloatCoordinateType centerOfMass() const

Public Static Attributes

const size_t DIM = 2

Private Members

bool isSorted_

Friends

friend nifty::cgp::CellGeometry< 2, 1 >::Geometry< 2 >
template <size_t DIM>
template<>
class CellGeometry<DIM, 0>

Inherits from std::array< array::StaticArray< uint32_t, 2 >, 1 >

Public Types

typedef std::integral_constant<size_t, DIM> DimensionType
typedef nifty::array::StaticArray<uint32_t, 2> CoordinateType
typedef nifty::array::StaticArray<float, DIM> FloatCoordinateType
typedef std::array<CoordinateType, 1> BaseType

Public Functions

FloatCoordinateType centerOfMass() const
template <size_t DIM, size_t CELL_TYPE>
class CellGeometryVector

Inherits from std::vector< CellGeometry< DIM, CELL_TYPE > >

template <T>
class CellVector

Inherits from std::vector< T >

template <class OBJECTIVE>
class Cgc

Inherits from nifty::graph::opt::multicut::MulticutBase< OBJECTIVE >

Public Types

typedef OBJECTIVE ObjectiveType
typedef ObjectiveType::WeightType WeightType
typedef MulticutBase<ObjectiveType> BaseType
typedef BaseType::VisitorBaseType VisitorBaseType
typedef BaseType::VisitorProxyType VisitorProxyType
typedef BaseType::NodeLabelsType NodeLabelsType
typedef ObjectiveType::GraphType GraphType
typedef ObjectiveType::WeightsMap WeightsMap
typedef GraphType:: template EdgeMap<uint8_t> nifty::graph::opt::multicut::Cgc::IsDirtyEdge
typedef UndirectedGraph SubGraph
typedef mincut::MincutObjective<SubGraph, double> MincutSubObjective
typedef mincut::MincutBase<MincutSubObjective> MincutSubBase
typedef nifty::graph::opt::common::SolverFactoryBase<MincutSubBase> MincutSubMcFactoryBase
typedef MincutSubBase::NodeLabelsType MincutSubNodeLabels
typedef MulticutObjective<SubGraph, double> MulticutSubObjective
typedef MulticutBase<MulticutSubObjective> MulticutSubBase
typedef nifty::graph::opt::common::SolverFactoryBase<MulticutSubBase> MulticutSubMcFactoryBase
typedef MulticutSubBase::NodeLabelsType MulticutSubNodeLabels
typedef nifty::graph::opt::common::SolverFactoryBase<BaseType> FactoryBase

Public Functions

virtual ~Cgc()
Cgc(const ObjectiveType &objective, const SettingsType &settings = SettingsType ())
void optimize(NodeLabelsType &nodeLabels, VisitorBaseType *visitor)
const Cgc<OBJECTIVE>::ObjectiveType &objective() const
virtual const NodeLabelsType &currentBestNodeLabels()
virtual std::string name() const
virtual void weightsChanged()
virtual double currentBestEnergy()

Private Types

typedef ComponentsUfd<GraphType> Components
typedef detail_cgc::PartitionCallback<OBJECTIVE, SettingsType> CallbackType

Private Functions

void cutPhase(VisitorProxyType &visitorProxy)
void betterCutPhase(VisitorProxyType &visitorProxy)
void glueAndCutPhase(VisitorProxyType &visitorProxy)

Private Members

const ObjectiveType &objective_
const GraphType &graph_
const WeightsMap &weights_
Components components_
SettingsType settings_
IsDirtyEdge isDirtyEdge_
detail_cgc::SubmodelOptimizer<ObjectiveType> submodel_
NodeLabelsType *currentBest_
double currentBestEnergy_
template <class OBJECTIVE>
class ChainedSolvers

Inherits from nifty::graph::opt::lifted_multicut::LiftedMulticutBase< OBJECTIVE >

Public Types

typedef OBJECTIVE ObjectiveType
typedef ObjectiveType::WeightType WeightType
typedef LiftedMulticutBase<ObjectiveType> BaseType
typedef BaseType::VisitorBaseType VisitorBaseType
typedef BaseType::VisitorProxyType VisitorProxyType
typedef BaseType::NodeLabelsType NodeLabelsType
typedef ObjectiveType::GraphType GraphType
typedef ObjectiveType::WeightsMap WeightsMap
typedef nifty::graph::opt::common::SolverFactoryBase<BaseType> LmcFactoryBase

Public Functions

virtual ~ChainedSolvers()
ChainedSolvers(const ObjectiveType &objective, const SettingsType &settings = SettingsType ())
void optimize(NodeLabelsType &nodeLabels, VisitorBaseType *visitor)
const ChainedSolvers<OBJECTIVE>::ObjectiveType &objective() const
virtual const NodeLabelsType &currentBestNodeLabels()
virtual std::string name() const
virtual void weightsChanged()

Private Members

const ObjectiveType &objective_
SettingsType settings_
NodeLabelsType *currentBest_
double currentBestEnergy_
template <class OBJECTIVE>
class ChainedSolvers

Inherits from nifty::graph::opt::multicut::MulticutBase< OBJECTIVE >

Public Types

typedef OBJECTIVE ObjectiveType
typedef ObjectiveType::WeightType WeightType
typedef MulticutBase<ObjectiveType> BaseType
typedef BaseType::VisitorBaseType VisitorBaseType
typedef BaseType::VisitorProxyType VisitorProxyType
typedef BaseType::NodeLabelsType NodeLabelsType
typedef ObjectiveType::GraphType GraphType
typedef ObjectiveType::WeightsMap WeightsMap
typedef GraphType:: template EdgeMap<uint8_t> nifty::graph::opt::multicut::ChainedSolvers::IsDirtyEdge
typedef nifty::graph::opt::common::SolverFactoryBase<BaseType> McFactoryBase

Public Functions

virtual ~ChainedSolvers()
ChainedSolvers(const ObjectiveType &objective, const SettingsType &settings = SettingsType ())
void optimize(NodeLabelsType &nodeLabels, VisitorBaseType *visitor)
const ChainedSolvers<OBJECTIVE>::ObjectiveType &objective() const
virtual const NodeLabelsType &currentBestNodeLabels()
virtual std::string name() const
virtual void weightsChanged()

Private Members

const ObjectiveType &objective_
SettingsType settings_
NodeLabelsType *currentBest_
double currentBestEnergy_
template <class T, class COMPARE = std::less<T>>
class ChangeablePriorityQueue

Public Types

typedef T priority_type
typedef int ValueType
typedef ValueType value_type
typedef ValueType const_reference

Public Functions

ChangeablePriorityQueue(const size_t maxSize)
void reset()
bool empty() const
void clear()
bool contains(const int i) const
int size() const
void push(const value_type i, const priority_type p)
const_reference top() const
priority_type topPriority() const
void pop()
priority_type priority(const value_type i) const
void deleteItem(const value_type i)
void changePriority(const value_type i, const priority_type p)

Private Functions

void swapItems(const int i, const int j)
void bubbleUp(int k)
void bubbleDown(int k)
bool _lt(const T &a, const T &b) const
bool _leqt(const T &a, const T &b) const
bool _eq(const T &a, const T &b) const
bool _gt(const T &a, const T &b) const
bool _geqt(const T &a, const T &b) const

Private Members

size_t maxSize_
size_t currentSize_
std::vector<int> heap_
std::vector<int> indices_
std::vector<T> priorities_
COMPARE comp_
template <class GRAPH>
class ComponentsBfs

Public Types

typedef GRAPH GraphType
typedef GraphType:: template EdgeMap<uint64_t> nifty::graph::ComponentsBfs::LabelsMapType
typedef GraphType:: template EdgeMap<bool> nifty::graph::ComponentsBfs::VisitedMapType

Public Functions

ComponentsBfs(const GraphType &graph)
uint64_t build()
template <class SUBGRAPH_MASK>
uint64_t build(const SUBGRAPH_MASK &mask)
void reset()
bool areConnected(const int64_t u, const int64_t v) const
uint64_t componentLabel(const uint64_t u)
uint64_t operator[](const uint64_t u) const
uint64_t maxLabel() const

Private Members

const GraphType &graph_
LabelsMapType labels_
VisitedMapType visited_
uint64_t numberOfLabels_
bool needsReset_
std::queue<uint64_t> queue_
template <class GRAPH>
class ComponentsUfd

Public Types

typedef GRAPH GraphType

Public Functions

ComponentsUfd(const GraphType &graph)
uint64_t build()
template <class NODE_LABELS>
uint64_t buildFromLabels(const NODE_LABELS &nodeLabels)
template <class EDGE_LABELS>
uint64_t buildFromEdgeLabels(const EDGE_LABELS &edgeLabels)
template <class SUBGRAPH_MASK>
uint64_t build(const SUBGRAPH_MASK &mask)
void reset()
bool areConnected(const int64_t u, const int64_t v) const
bool areConnected(const int64_t u, const int64_t v)
uint64_t componentLabel(const uint64_t u) const
uint64_t componentLabel(const uint64_t u)
uint64_t operator[](const uint64_t u) const
uint64_t maxLabel() const
template <class NODE_MAP>
void denseRelabeling(NODE_MAP &nodeMap) const
template <class NODE_MAP, class COMP_SIZE>
void denseRelabeling(NODE_MAP &nodeMap, COMP_SIZE &compSize) const
const GraphType &graph() const

Private Members

const GraphType &graph_
nifty::ufd::Ufd<> ufd_
uint64_t offset_
bool needsReset_
template <bool, typename T, typename>
struct conditional

Public Types

typedef T type
template <typename T, typename F>
template<>
struct conditional<false, T, F>

Public Types

typedef F type
template <class ITERATOR>
class ConstIteratorRange

Public Types

typedef ITERATOR const_iterator

Public Functions

ConstIteratorRange(const_iterator b, const_iterator e)
const_iterator begin() const
const_iterator begin()
const_iterator end() const
const_iterator end()

Private Members

ITERATOR begin_
ITERATOR end_
class ConstProxy

Public Functions

template<>
ConstProxy(const T *ptr, const size_t size)
template<>
const T &operator[](const size_t i) const
template<>
const T &operator[](const size_t i)

Private Members

template<>
const T *ptr_
template<>
size_t size_
class ConstProxy

Public Functions

template<>
ConstProxy(const ARRAY &array, const uint64_t node)
template<>
const_reference operator[](const size_t i) const
template<>
const_reference operator[](const size_t i)
template<>
size_t size() const

Private Members

template<>
uint64_t node_
template<>
const ARRAY *array_
struct ContiguousTag
class Cplex

Public Types

typedef IlpBackendSettings SettingsType

Public Functions

Cplex(const SettingsType &settings = SettingsType ())
~Cplex()
void initModel(const size_t numberOfVariables, const double *coefficients)
template <class Iterator>
void setStart(Iterator valueIterator)
template <class VariableIndexIterator, class CoefficientIterator>
void addConstraint(VariableIndexIterator viBegin, VariableIndexIterator viEnd, CoefficientIterator coefficient, const double lowerBound, const double upperBound)
void optimize()
double label(const size_t variableIndex) const
template <class OBJECTIVE_ITERATOR>
void changeObjective(OBJECTIVE_ITERATOR objectiveIter)

Public Static Functions

static std::string name()

Private Members

SettingsType settings_
uint64_t nVariables_
IloEnv env_
IloModel model_
IloNumVarArray x_
IloRangeArray c_
IloObjective obj_
IloNumArray sol_
IloCplex cplex_
struct CycleWithNegativeWeightsDetectedError

Inherits from runtime_error

Public Functions

CycleWithNegativeWeightsDetectedError()
template <class T>
class DefaultAccumulatedStatistics

Public Types

typedef bacc::accumulator_set<T, bacc::stats<bacc::tag::count, bacc::tag::mean, bacc::tag::min, bacc::tag::max, bacc::tag::moment<2>, bacc::tag::moment<3>, bacc::tag::tail_quantile<bacc::right>>> AccType
typedef std::integral_constant<int, 1> NPasses
typedef std::integral_constant<int, 11> NFeatures

Public Functions

DefaultAccumulatedStatistics(const size_t rightTailCacheSize = 1000)
DefaultAccumulatedStatistics &acc(const T &val, const size_t pass = 0)
template <class RESULT_ITER>
void result(RESULT_ITER rBegin, RESULT_ITER rEnd)
size_t requiredPasses() const
size_t nFeatures() const

Private Functions

T replaceRotten(const T &val, const T &replaceVal)

Private Members

AccType acc_
struct DefaultProposalGeneratorMock
template <class G>
struct DefaultSubgraphMask

Public Functions

bool useEdge(const uint64_t) const
bool useNode(const uint64_t) const
template <class AGGLOMERATIVE_CLUSTERING>
class DendrogramAgglomerativeClusteringVisitor

Public Types

typedef AGGLOMERATIVE_CLUSTERING AgglomerativeClusteringType
typedef AgglomerativeClusteringType::GraphType GraphType
typedef GraphType:: template NodeMap<double> nifty::graph::agglo::DendrogramAgglomerativeClusteringVisitor::NodeToEncoding
typedef GraphType:: template NodeMap<double> nifty::graph::agglo::DendrogramAgglomerativeClusteringVisitor::NodeSize

Public Functions

DendrogramAgglomerativeClusteringVisitor(const AgglomerativeClusteringType &agglomerativeClustering)
template <class NODE_SIZES>
DendrogramAgglomerativeClusteringVisitor(const AgglomerativeClusteringType &agglomerativeClustering, NODE_SIZES &nodeSizes)
bool isDone() const
void visit(const uint64_t aliveNode, const uint64_t deadNode, const double p)
const auto &agglomerativeClustering() const
const auto &dendrogramEncoding() const

Private Types

typedef std::tuple<uint64_t, uint64_t, double, double> MergeEncodingType

Private Members

const AgglomerativeClusteringType &agglomerativeClustering_
NodeSize nodeSizes_
NodeToEncoding nodeToEncoding_
std::vector<MergeEncodingType> encoding_
uint64_t timeStamp_
template <class CHILD_GRAPH>
class DirectedGraphBase

Public Types

typedef CHILD_GRAPH ChildGraph
typedef DirectedGraphBase<ChildGraph> Self

Public Functions

NodeIterRange<ChildGraph> nodes() const
ArcIterRange<ChildGraph> arcs() const
ArcIterRange<ChildGraph> edges() const
AdjacencyIterRange<ChildGraph> adjacency(const int64_t node) const
int64_t findEdge(const uint64_t u, const uint64_t v)
int64_t edgeIdUpperBound() const
int64_t numberOfEdges() const

Private Functions

ChildGraph &_child()
const ChildGraph &_child() const
template <class GRAPH>
class DirectedGraphView

Public Types

typedef GRAPH GraphType

Private Members

const GraphType &graph_
struct DontComputeRag
template <class GRAPH, class ACC_0, class ACC_1, bool ENABLE_UCM>
class DualClusterPolicy

Public Types

typedef Acc0Type::SettingsType Acc0SettingsType
typedef Acc1Type::SettingsType Acc1SettingsType
typedef GRAPH GraphType
typedef FloatEdgeMap EdgePrioType
typedef FloatEdgeMap EdgeSizesType
typedef FloatNodeMap NodeSizesType
typedef EdgeContractionGraph<GraphType, SelfType> EdgeContractionGraphType

Public Functions

template <class MERGE_PRIOS, class NOT_MERGE_PRIOS, class IS_LOCAL_EDGE, class EDGE_SIZES>
DualClusterPolicy(const GraphType &graph, const MERGE_PRIOS &mergePrios, const NOT_MERGE_PRIOS &notMergePrios, const IS_LOCAL_EDGE &isLocalEdge, const EDGE_SIZES &edgeSizes, const SettingsType &settings = SettingsType ())
std::pair<uint64_t, double> edgeToContractNext() const
bool isDone()
DualClusterPolicy<GRAPH, ACC_0, ACC_1, ENABLE_UCM>::EdgeContractionGraphType &edgeContractionGraph()
void contractEdge(const uint64_t edgeToContract)
void mergeNodes(const uint64_t aliveNode, const uint64_t deadNode)
void mergeEdges(const uint64_t aliveEdge, const uint64_t deadEdge)
void contractEdgeDone(const uint64_t edgeToContract)
bool isMergeAllowed(const uint64_t edge)

Private Types

typedef DualClusterPolicy<GRAPH, ACC_0, ACC_1, ENABLE_UCM> SelfType
typedef GRAPH:: template EdgeMap<uint8_t> nifty::graph::agglo::DualClusterPolicy::UInt8EdgeMap
typedef GRAPH:: template EdgeMap<double> nifty::graph::agglo::DualClusterPolicy::FloatEdgeMap
typedef GRAPH:: template NodeMap<double> nifty::graph::agglo::DualClusterPolicy::FloatNodeMap
typedef ACC_0 Acc0Type
typedef ACC_1 Acc1Type
typedef nifty::tools::ChangeablePriorityQueue<double, std::greater<double>> QueueType

Private Functions

double pqMergePrio(const uint64_t edge) const

Private Members

const GraphType &graph_
ACC_0 acc0_
ACC_1 acc1_
UInt8EdgeMap isLocalEdge_
UInt8EdgeMap isPureLocal_
UInt8EdgeMap isPureLifted_
SettingsType settings_
EdgeContractionGraphType edgeContractionGraph_
QueueType pq_
uint64_t edgeToContractNext_
double edgeToContractNextMergePrio_

Friends

friend nifty::graph::agglo::DualClusterPolicy::EdgeContractionGraph< GraphType, SelfType, ENABLE_UCM >
template <class GRAPH, class CALLBACK, bool WITH_EDGE_UFD>
class EdgeContractionGraph

Inherits from detail_edge_contraction_graph::EdgeContractionGraphEdgeUfdHelper< GRAPH, WITH_EDGE_UFD >

Public Types

typedef std::integral_constant<bool, WITH_EDGE_UFD> WithEdgeUfd
typedef GRAPH GraphType
typedef CALLBACK Callback
typedef nifty::ufd::Ufd<> NodeUfdType
typedef std::pair<int64_t, int64_t> EdgeStorage
typedef NodeStorage::const_iterator AdjacencyIter

Public Functions

EdgeContractionGraph(const GraphType &graph, Callback &callback)
EdgeContractionGraph<GRAPH, CALLBACK, WITH_EDGE_UFD>::AdjacencyIterRange adjacency(const int64_t node) const
EdgeContractionGraph<GRAPH, CALLBACK, WITH_EDGE_UFD>::AdjacencyIter adjacencyBegin(const int64_t node) const
EdgeContractionGraph<GRAPH, CALLBACK, WITH_EDGE_UFD>::AdjacencyIter adjacencyEnd(const int64_t node) const
EdgeContractionGraph<GRAPH, CALLBACK, WITH_EDGE_UFD>::AdjacencyIter adjacencyOutBegin(const int64_t node) const
EdgeContractionGraph<GRAPH, CALLBACK, WITH_EDGE_UFD>::EdgeStorage uv(const uint64_t edge) const
int64_t u(const uint64_t edge) const
int64_t v(const uint64_t edge) const
uint64_t numberOfNodes() const
uint64_t numberOfEdges() const
uint64_t nodeIdUpperBound() const
uint64_t edgeIdUpperBound() const
int64_t findEdge(const int64_t u, const int64_t v) const
void contractEdge(const uint64_t edgeToContract)
void reset()
const EdgeContractionGraph<GRAPH, CALLBACK, WITH_EDGE_UFD>::GraphType &baseGraph() const
const EdgeContractionGraph<GRAPH, CALLBACK, WITH_EDGE_UFD>::GraphType &graph() const
uint64_t findRepresentativeNode(const uint64_t node) const
uint64_t findRepresentativeNode(const uint64_t node)
uint64_t nodeOfDeadEdge(const uint64_t deadEdge) const
const NodeUfdType &nodeUfd() const

Private Types

typedef detail_graph::UndirectedAdjacency<int64_t, int64_t, int64_t, int64_t> NodeAdjacency
typedef nifty::container::BoostFlatSet<NodeAdjacency> NodeStorage
typedef GraphType:: template NodeMap<NodeStorage> nifty::graph::EdgeContractionGraph::NodesContainer
typedef GraphType:: template EdgeMap<EdgeStorage> nifty::graph::EdgeContractionGraph::EdgeContainer

Private Functions

void relabelEdge(const uint64_t edge, const uint64_t deadNode, const uint64_t aliveNode)

Private Members

const GraphType &graph_
Callback &callback_
NodesContainer nodes_
NodeUfdType nodeUfd_
uint64_t currentNodeNum_
uint64_t currentEdgeNum_
template <class GRAPH, class OUTER_CALLBACK, class SET>
class EdgeContractionGraphWithSets

Inherits from nifty::graph::UndirectedGraphBase< EdgeContractionGraphWithSets< GRAPH, OUTER_CALLBACK, SET >, EdgeContractionGraphWithSetsHelper< GRAPH, OUTER_CALLBACK, SET >::NodeIter, EdgeContractionGraphWithSetsHelper< GRAPH, OUTER_CALLBACK, SET >::EdgeIter, EdgeContractionGraphWithSetsHelper< GRAPH, OUTER_CALLBACK, SET >::AdjacencyIter >

Public Types

typedef TypeHelper::GraphType GraphType
typedef TypeHelper::OuterCallbackType OuterCallbackType
typedef TypeHelper::SetType SetType
typedef TypeHelper::NodeUfdType NodeUfdType
typedef TypeHelper::EdgeIter EdgeIter
typedef TypeHelper::NodeIter NodeIter
typedef TypeHelper::AdjacencyIter AdjacencyIter
typedef SparseTag EdgeIdTag
typedef SparseTag NodeIdTag
typedef SortedTag EdgeIdOrderTag
typedef SortedTag NodeIdOrderTag

Public Functions

EdgeContractionGraphWithSets(const GraphType &graph, OuterCallbackType &outerCallback)
NodeIter nodesBegin() const
NodeIter nodesEnd() const
EdgeIter edgesBegin() const
EdgeIter edgesEnd() const
template <class F>
void forEachEdge(F &&f) const
template <class F>
void forEachNode(F &&f) const
AdjacencyIter adjacencyBegin(const int64_t node) const
AdjacencyIter adjacencyEnd(const int64_t node) const
AdjacencyIter adjacencyOutBegin(const int64_t node) const
EdgeStorage uv(const uint64_t edge) const
int64_t u(const uint64_t edge) const
int64_t v(const uint64_t edge) const
uint64_t numberOfNodes() const
uint64_t numberOfEdges() const
int64_t nodeIdUpperBound() const
int64_t edgeIdUpperBound() const
int64_t findEdge(const int64_t u, const int64_t v) const
void contractEdge(const uint64_t edgeToContract)
void reset()
const GraphType &baseGraph() const
uint64_t findRepresentativeNode(const uint64_t node) const
uint64_t findRepresentativeNode(const uint64_t node)
uint64_t findRepresentativeEdge(const uint64_t edge) const
uint64_t findRepresentativeEdge(const uint64_t edge)
uint64_t nodeOfDeadEdge(const uint64_t deadEdge) const
const NodeUfdType &nodeUfd() const

Private Types

typedef EdgeContractionGraphWithSetsHelper<GRAPH, OUTER_CALLBACK, SET> TypeHelper
typedef TypeHelper::SelfType SelfType
typedef TypeHelper::CGraphType CGraphType
typedef TypeHelper::EdgeStorage EdgeStorage
typedef detail_edge_contraction_graph::InnerCallback<GraphType, OuterCallbackType, SetType> InnerCallbackType

Private Members

InnerCallbackType innerCallback_
CGraphType cgraph_
template <class GRAPH, class OUTER_CALLBACK, class SET>
struct EdgeContractionGraphWithSetsHelper

Public Types

typedef GRAPH GraphType
typedef OUTER_CALLBACK OuterCallbackType
typedef SET SetType
typedef EdgeContractionGraphWithSets<GraphType, OuterCallbackType, SET> SelfType
typedef detail_edge_contraction_graph::InnerCallback<GraphType, OuterCallbackType, SetType> InnerCallbackType
typedef EdgeContractionGraph<GRAPH, InnerCallbackType> CGraphType
typedef CGraphType::AdjacencyIter AdjacencyIter
typedef CGraphType::EdgeStorage EdgeStorage
typedef CGraphType::NodeUfdType NodeUfdType
typedef SetType::const_iterator EdgeIter
typedef SetType::const_iterator NodeIter
template <class GRAPH>
class EdgeIndicesToContiguousEdgeIndices

Inherits from nifty::graph::detail_graph::EdgeIndicesToContiguousEdgeIndicesImpl< GRAPH, GRAPH::EdgeIdTag >

template <class GRAPH, class EDGE_ID_TAG>
class EdgeIndicesToContiguousEdgeIndicesImpl

Public Types

typedef GRAPH GraphType

Public Functions

EdgeIndicesToContiguousEdgeIndicesImpl(const GraphType &graph)
int64_t operator[](const int64_t edge) const

Private Types

typedef GraphType:: template EdgeMap<uint64_t> nifty::graph::detail_graph::EdgeIndicesToContiguousEdgeIndicesImpl::ContiguousIdStorage

Private Members

ContiguousIdStorage ids_
template <class GRAPH>
template<>
class EdgeIndicesToContiguousEdgeIndicesImpl<GRAPH, nifty::graph::ContiguousTag>

Public Types

typedef GRAPH GraphType

Public Functions

EdgeIndicesToContiguousEdgeIndicesImpl(const GraphType &graph)
int64_t operator[](const int64_t edge) const
class EdgeIter

Inherits from boost::counting_iterator< int64_t >

template <class _CHILD_GRAPH>
struct EdgeIterRange

Inherits from nifty::tools::ConstIteratorRange< _CHILD_GRAPH::EdgeIter >

template <class T>
struct EdgeMap

Inherits from nifty::graph::graph_maps::EdgeMap< ChildGraph, T >

template <class T>
struct EdgeMap

Inherits from nifty::graph::graph_maps::EdgeMap< ChildGraph, T >

template <class G, class T>
struct EdgeMap

Inherits from std::vector< T >

Public Functions

EdgeMap(const G &g, const T &val)
EdgeMap(const G &g)
EdgeMap()
void insertedEdges(const uint64_t edgeId, const T &insertValue = T())
template <class GRAPH, class NODE_MAP, class BINARY_FUNCTOR>
class EdgeMapFromNodeMap

Public Types

typedef GRAPH GraphType
typedef BINARY_FUNCTOR BinaryFunctorType
typedef BinaryFunctorType::value_type value_type
typedef NODE_MAP NodeMapType

Public Functions

EdgeMapFromNodeMap(const GraphType &graph, NodeMapType nodeMap, BinaryFunctorType binaryFunctor)
value_type operator[](const uint64_t edgeIndex) const

Private Members

const GraphType &graph_
NODE_MAP nodeMap_
BinaryFunctorType binaryFunctor_
struct EdgeTag
template <class GRAPH, bool ENABLE_UCM>
class EdgeWeightedClusterPolicy

Public Types

typedef GRAPH GraphType
typedef FloatEdgeMap EdgeIndicatorsType
typedef FloatEdgeMap EdgeSizesType
typedef FloatNodeMap NodeSizesType
typedef EdgeWeightedClusterPolicySettings SettingsType
typedef EdgeContractionGraph<GraphType, SelfType> EdgeContractionGraphType

Public Functions

template <class EDGE_INDICATORS, class EDGE_SIZES, class NODE_SIZES>
EdgeWeightedClusterPolicy(const GraphType &graph, const EDGE_INDICATORS &edgeIndicators, const EDGE_SIZES &edgeSizes, const NODE_SIZES &nodeSizes, const SettingsType &settings = SettingsType ())
std::pair<uint64_t, double> edgeToContractNext() const
bool isDone() const
EdgeWeightedClusterPolicy<GRAPH, ENABLE_UCM>::EdgeContractionGraphType &edgeContractionGraph()
void contractEdge(const uint64_t edgeToContract)
void mergeNodes(const uint64_t aliveNode, const uint64_t deadNode)
void mergeEdges(const uint64_t aliveEdge, const uint64_t deadEdge)
void contractEdgeDone(const uint64_t edgeToContract)
const EdgeIndicatorsType &edgeIndicators() const
const EdgeSizesType &edgeSizes() const
const NodeSizesType &nodeSizes() const

Private Types

typedef EdgeWeightedClusterPolicy<GRAPH, ENABLE_UCM> SelfType
typedef GRAPH:: template EdgeMap<double> nifty::graph::agglo::EdgeWeightedClusterPolicy::FloatEdgeMap
typedef GRAPH:: template NodeMap<double> nifty::graph::agglo::EdgeWeightedClusterPolicy::FloatNodeMap
typedef nifty::tools::ChangeablePriorityQueue<double, std::less<double>> QueueType

Private Functions

void initializeWeights()
double computeWeight(const uint64_t edge) const

Private Members

const GraphType &graph_
EdgeIndicatorsType edgeIndicators_
EdgeSizesType edgeSizes_
NodeSizesType nodeSizes_
SettingsType settings_
EdgeContractionGraphType edgeContractionGraph_
QueueType pq_

Friends

friend nifty::graph::agglo::EdgeWeightedClusterPolicy::EdgeContractionGraph< GraphType, SelfType, ENABLE_UCM >
struct EdgeWeightedClusterPolicySettings

Subclassed by nifty::graph::agglo::MalaClusterPolicy< GRAPH, ENABLE_UCM >::SettingsType

Public Members

double sizeRegularizer = {0.5}
uint64_t numberOfNodesStop = {1}
uint64_t numberOfEdgesStop = {0}
template <class SOLVER>
class EmptyVisitor

Inherits from nifty::graph::opt::common::VisitorBase< SOLVER >

Public Types

typedef SOLVER SolverType

Public Functions

virtual void begin(SolverType *solver)
virtual bool visit(SolverType *solver)
virtual void end(SolverType *solver)
template <typename T, typename, typename = void, typename = void>
struct enable
template <typename T>
template<>
struct enable<T, expr, expr, expr>

Public Types

typedef T type
template <typename T>
template<>
struct enable<T, expr, expr, half>

Public Types

typedef T type
template <typename T>
template<>
struct enable<T, expr, expr, void>

Public Types

typedef T type
template <typename T>
template<>
struct enable<T, expr, half, expr>

Public Types

typedef T type
template <typename T>
template<>
struct enable<T, expr, half, half>

Public Types

typedef T type
template <typename T>
template<>
struct enable<T, expr, half, void>

Public Types

typedef T type
template <typename T>
template<>
struct enable<T, expr, void, void>

Public Types

typedef T type
template <typename T>
template<>
struct enable<T, half, expr, expr>

Public Types

typedef T type
template <typename T>
template<>
struct enable<T, half, expr, half>

Public Types

typedef T type
template <typename T>
template<>
struct enable<T, half, expr, void>

Public Types

typedef T type
template <typename T>
template<>
struct enable<T, half, half, expr>

Public Types

typedef T type
template <typename T>
template<>
struct enable<T, half, half, half>

Public Types

typedef T type
template <typename T>
template<>
struct enable<T, half, half, void>

Public Types

typedef T type
template <typename T>
template<>
struct enable<T, half, void, void>

Public Types

typedef T type
template <std::size_t DIM, class LABEL_TYPE>
class ExplicitLabels

Public Types

typedef tools::BlockView<LABEL_TYPE> BlockStorageType
typedef LABEL_TYPE LabelType
typedef marray::Marray<LABEL_TYPE> SubarrayViewType
typedef nifty::marray::View<LABEL_TYPE> ViewType

Public Functions

ExplicitLabels(const nifty::marray::View<LABEL_TYPE, false> &labels = nifty::marray::View < LABEL_TYPE, false >())
uint64_t numberOfLabels() const
template <class ROI_BEGIN_COORD, class ROI_END_COORD>
void readSubarray(const ROI_BEGIN_COORD &roiBeginCoord, const ROI_END_COORD &roiEndCoord, marray::View<LABEL_TYPE> &outArray) const
const ViewType &labels() const
const array::StaticArray<int64_t, DIM> &shape() const

Private Members

nifty::marray::View<LABEL_TYPE> labels_
array::StaticArray<int64_t, DIM> shape_
template <bool WITH_UCM>
struct ExportUcmFunctions

Public Static Functions

template <class AGGLO_CLUSTER_TYPE>
static void exportUcm(py::class_<AGGLO_CLUSTER_TYPE> &aggloCls)
template <>
template<>
struct ExportUcmFunctions<true>

Public Static Functions

template <class AGGLO_CLUSTER_TYPE>
static void exportUcm(py::class_<AGGLO_CLUSTER_TYPE> &aggloCls)
struct expr

Public Functions

HALF_CONSTEXPR expr(float f)
HALF_CONSTEXPR operator float() const

Private Members

float value_
template <typename fastfilters_array_t>
struct FastfiltersDim
template <>
template<>
struct FastfiltersDim<fastfilters_array2d_t>

Public Static Functions

static void set_z(size_t, fastfilters_array2d_t)
static void set_stride_z(size_t, fastfilters_array2d_t)

Public Static Attributes

const unsigned int ndim = 2
template <>
template<>
struct FastfiltersDim<fastfilters_array3d_t>

Public Static Functions

static void set_z(size_t n_z, fastfilters_array3d_t &k)
static void set_stride_z(size_t stride_z, fastfilters_array3d_t &k)

Public Static Attributes

const unsigned int ndim = 3
template <class S = std::size_t>
class FFT

Public Types

typedef S size_type

Public Functions

FFT(const andres::Marray<double> &in, andres::Marray<std::complex<double>> &out)
~FFT()
void execute()

Private Members

fftw_plan plan_
template <class T>
struct FiFo

Inherits from std::queue< T >

Public Functions

const T &nextElement()
template <size_t DIM>
class FilledTopologicalGrid
template <>
template<>
class FilledTopologicalGrid<2>

Public Types

typedef array::StaticArray<int64_t, 2> CoordinateType
typedef array::StaticArray<uint32_t, 3> NumberOfCellsType
typedef TopologicalGrid<2> TopologicalGridType

Public Functions

FilledTopologicalGrid(const TopologicalGridType &tGrid)
const NumberOfCellsType &numberOfCells() const
const nifty::marray::Marray<uint32_t> &array() const
const CoordinateType &shape() const
const CoordinateType &topologicalGridShape() const
const NumberOfCellsType &cellTypeOffset() const

Private Members

CoordinateType shape_
CoordinateType tShape_
NumberOfCellsType numberOfCells_
nifty::marray::Marray<uint32_t> ftGrid_
NumberOfCellsType cellTypeOffset_
struct FilterBase

Subclassed by nifty::features::GaussianGradientMagnitude, nifty::features::GaussianSmoothing, nifty::features::HessianOfGaussianEigenvalues, nifty::features::LaplacianOfGaussian, nifty::features::StructureTensorEigenvalues

Public Functions

FilterBase()
virtual void operator()(const fastfilters_array2d_t&, marray::View<float>&, const double) const = 0
virtual void operator()(const fastfilters_array3d_t&, marray::View<float>&, const double) const = 0
virtual bool isMultiChannel() const = 0
void set_window_ratio(const double ratio)

Protected Attributes

fastfilters_options_t opt_
template <class GRAPH, class ACC_0, class ACC_1, bool ENABLE_UCM>
class FixationClusterPolicy

Public Types

enum EdgeStates

Values:

PURE_LOCAL = 0
LOCAL = 1
LIFTED = 2
PURE_LIFTED = 3
typedef Acc0Type::SettingsType Acc0SettingsType
typedef Acc1Type::SettingsType Acc1SettingsType
typedef GRAPH GraphType
typedef FloatEdgeMap EdgePrioType
typedef FloatEdgeMap EdgeSizesType
typedef FloatNodeMap NodeSizesType
typedef EdgeContractionGraph<GraphType, SelfType> EdgeContractionGraphType

Public Functions

template <class MERGE_PRIOS, class NOT_MERGE_PRIOS, class IS_LOCAL_EDGE, class EDGE_SIZES>
FixationClusterPolicy(const GraphType &graph, const MERGE_PRIOS &mergePrios, const NOT_MERGE_PRIOS &notMergePrios, const IS_LOCAL_EDGE &isLocalEdge, const EDGE_SIZES &edgeSizes, const SettingsType &settings = SettingsType ())
std::pair<uint64_t, double> edgeToContractNext() const
bool isDone()
FixationClusterPolicy<GRAPH, ACC_0, ACC_1, ENABLE_UCM>::EdgeContractionGraphType &edgeContractionGraph()
void contractEdge(const uint64_t edgeToContract)
void mergeNodes(const uint64_t aliveNode, const uint64_t deadNode)
void mergeEdges(const uint64_t aliveEdge, const uint64_t deadEdge)
void contractEdgeDone(const uint64_t edgeToContract)
bool isMergeAllowed(const uint64_t edge)

Private Types

typedef FixationClusterPolicy<GRAPH, ACC_0, ACC_1, ENABLE_UCM> SelfType
typedef GRAPH:: template EdgeMap<uint8_t> nifty::graph::agglo::FixationClusterPolicy::UInt8EdgeMap
typedef GRAPH:: template EdgeMap<float> nifty::graph::agglo::FixationClusterPolicy::FloatEdgeMap
typedef GRAPH:: template NodeMap<float> nifty::graph::agglo::FixationClusterPolicy::FloatNodeMap
typedef ACC_0 Acc0Type
typedef ACC_1 Acc1Type
typedef nifty::tools::ChangeablePriorityQueue<float, std::greater<float>> QueueType

Private Functions

double pqMergePrio(const uint64_t edge) const

Private Members

const GraphType &graph_
ACC_0 acc0_
ACC_1 acc1_
GRAPH:: template EdgeMap<EdgeStates> nifty::graph::agglo::FixationClusterPolicy::edgeState_
SettingsType settings_
EdgeContractionGraphType edgeContractionGraph_
QueueType pq_
uint64_t edgeToContractNext_
double edgeToContractNextMergePrio_

Friends

friend nifty::graph::agglo::FixationClusterPolicy::EdgeContractionGraph< GraphType, SelfType, ENABLE_UCM >
template <class Key, class Comparison = std::less<Key>, class Allocator = std::allocator<Key>>
class FlatSet

Public Types

typedef Key key_type
typedef Key value_type
typedef Comparison key_compare
typedef Comparison value_compare
typedef Allocator allocator_type
typedef Allocator::const_reference const_reference
typedef Vector::iterator iterator
typedef Vector::const_iterator const_iterator
typedef Vector::reverse_iterator reverse_iterator
typedef Vector::const_reverse_iterator const_reverse_iterator
typedef Vector::size_type size_type
typedef Vector::difference_type difference_type
typedef Vector::const_pointer const_pointer

Public Functions

FlatSet(const std::size_t reserveSize, const Comparison &comparison = Comparison(), const Allocator &allocator = Allocator())
FlatSet(const Comparison &comparison = Comparison(), const Allocator &allocator = Allocator())
template <class Iterator>
FlatSet(Iterator beginInput, Iterator endInput, const Comparison &comparison = Comparison(), const Allocator &allocator = Allocator())
const FlatSet<Key, Comparison, Allocator>::value_type &operator[](const size_type) const
FlatSet<Key, Comparison, Allocator>::const_iterator begin() const
FlatSet<Key, Comparison, Allocator>::const_iterator end() const
FlatSet<Key, Comparison, Allocator>::iterator begin()
FlatSet<Key, Comparison, Allocator>::iterator end()
FlatSet<Key, Comparison, Allocator>::const_reverse_iterator rbegin() const
FlatSet<Key, Comparison, Allocator>::const_reverse_iterator rend() const
FlatSet<Key, Comparison, Allocator>::reverse_iterator rbegin()
FlatSet<Key, Comparison, Allocator>::reverse_iterator rend()
FlatSet<Key, Comparison, Allocator>::const_iterator find(const key_type &value) const
FlatSet<Key, Comparison, Allocator>::iterator find(const key_type &value)
bool empty() const
FlatSet<Key, Comparison, Allocator>::size_type size() const
FlatSet<Key, Comparison, Allocator>::size_type max_size() const
std::pair<const_iterator, bool> insert(const value_type&)
template <class Iterator>
void insert(Iterator first, Iterator last)
const_iterator insert(iterator, const value_type&)
void erase(iterator position)
FlatSet<Key, Comparison, Allocator>::size_type erase(const key_type &x)
void erase(iterator, iterator)
void clear()
FlatSet<Key, Comparison, Allocator>::size_type count(const key_type &value) const
FlatSet<Key, Comparison, Allocator>::key_compare key_comp() const
FlatSet<Key, Comparison, Allocator>::value_compare value_comp() const
FlatSet<Key, Comparison, Allocator>::const_iterator lower_bound(const key_type &value) const
FlatSet<Key, Comparison, Allocator>::const_iterator upper_bound(const key_type &value) const
FlatSet<Key, Comparison, Allocator>::iterator lower_bound(const key_type &value)
FlatSet<Key, Comparison, Allocator>::iterator upper_bound(const key_type &value)
std::pair<typename FlatSet<Key, Comparison, Allocator>::const_iterator, typename FlatSet<Key, Comparison, Allocator>::const_iterator> equal_range(const key_type &value) const
std::pair<typename FlatSet<Key, Comparison, Allocator>::iterator, typename FlatSet<Key, Comparison, Allocator>::iterator> equal_range(const key_type &value)
FlatSet<Key, Comparison, Allocator>::allocator_type get_allocator() const

Private Types

typedef std::vector<Key, Allocator> Vector

Private Members

std::vector<Key> vector_
Comparison compare_
struct FlexibleCallback

Public Functions

void contractEdge(const uint64_t edgeToContract)
void mergeNodes(const uint64_t aliveNode, const uint64_t deadNode)
void mergeEdges(const uint64_t aliveEdge, const uint64_t deadEdge)
void contractEdgeDone(const uint64_t edgeToContract)

Public Members

std::function<void(uint64_t)> contractEdgeCallback
std::function<void(uint64_t, uint64_t)> mergeNodesCallback
std::function<void(uint64_t, uint64_t)> mergeEdgesCallback
std::function<void(uint64_t)> contractEdgeDoneCallback
struct functions

Public Static Functions

static expr plus(float x, float y)
static expr minus(float x, float y)
static expr multiplies(float x, float y)
static expr divides(float x, float y)
template <typename charT, typename traits>
static std::basic_ostream<charT, traits> &write(std::basic_ostream<charT, traits> &out, float arg)
template <typename charT, typename traits>
static std::basic_istream<charT, traits> &read(std::basic_istream<charT, traits> &in, half &arg)
static expr fmod(float x, float y)
static expr remainder(float x, float y)
static expr remquo(float x, float y, int *quo)
static expr fdim(float x, float y)
static expr fma(float x, float y, float z)
static half nanh()
static expr exp(float arg)
static expr expm1(float arg)
static expr exp2(float arg)
static expr log(float arg)
static expr log10(float arg)
static expr log1p(float arg)
static expr log2(float arg)
static expr sqrt(float arg)
static expr cbrt(float arg)
static expr hypot(float x, float y)
static expr pow(float base, float exp)
static expr sin(float arg)
static expr cos(float arg)
static expr tan(float arg)
static expr asin(float arg)
static expr acos(float arg)
static expr atan(float arg)
static expr atan2(float x, float y)
static expr sinh(float arg)
static expr cosh(float arg)
static expr tanh(float arg)
static expr asinh(float arg)
static expr acosh(float arg)
static expr atanh(float arg)
static expr erf(float arg)
static expr erfc(float arg)
static expr lgamma(float arg)
static expr tgamma(float arg)
static half floor(half arg)
static half ceil(half arg)
static half trunc(half arg)
static half round(half arg)
static long lround(half arg)
static half rint(half arg)
static long lrint(half arg)
static half frexp(half arg, int *exp)
static half modf(half arg, half *iptr)
static half scalbln(half arg, long exp)
static int ilogb(half arg)
static half logb(half arg)
static half nextafter(half from, half to)
static half nexttoward(half from, long double to)
static half copysign(half x, half y)
static int fpclassify(half arg)
static bool isfinite(half arg)
static bool isinf(half arg)
static bool isnan(half arg)
static bool isnormal(half arg)
static bool signbit(half arg)
static bool isequal(half x, half y)
static bool isnotequal(half x, half y)
static bool isgreater(half x, half y)
static bool isgreaterequal(half x, half y)
static bool isless(half x, half y)
static bool islessequal(half x, half y)
static bool islessgreater(half x, half y)
static bool isunordered(half x, half y)

Private Static Functions

static double erf(double arg)
static double lgamma(double arg)
template <class OBJECTIVE>
class FusionMove

Public Types

typedef OBJECTIVE ObjectiveType
typedef ObjectiveType::GraphType GraphType
typedef GraphType:: template NodeMap<uint64_t> nifty::graph::opt::multicut::FusionMove::NodeLabelsType
typedef UndirectedGraph FmGraph
typedef MulticutObjective<FmGraph, double> FmObjective
typedef MulticutBase<FmObjective> FmMcBase
typedef nifty::graph::opt::common::SolverFactoryBase<FmMcBase> FmMcFactoryBase
typedef MulticutEmptyVisitor<FmObjective> FmEmptyVisitor
typedef FmMcBase::NodeLabelsType FmNodeLabelsType

Public Functions

FusionMove(const ObjectiveType &objective, const SettingsType &settings = SettingsType ())
template <class NODE_MAP>
void fuse(std::initializer_list<const NODE_MAP *> proposals, NODE_MAP *result)
template <class NODE_MAP>
void fuse(const std::vector<const NODE_MAP *> &proposals, NODE_MAP *result)

Private Functions

template <class NODE_MAP>
void fuseImpl(NODE_MAP *result)

Private Members

const ObjectiveType &objective_
const GraphType &graph_
SettingsType settings_
nifty::ufd::Ufd<> ufd_
NodeLabelsType nodeToDense_
template <class OBJECTIVE>
class FusionMove

Public Types

typedef OBJECTIVE ObjectiveType
typedef ObjectiveType::GraphType GraphType
typedef GraphType:: template NodeMap<uint8_t> nifty::graph::opt::common::FusionMove::NodeLabels
typedef UndirectedGraph FmGraph
typedef MulticutObjective<FmGraph, double> FmObjective
typedef MulticutFactoryBase<FmObjective> FmMcFactoryBase
typedef MulticutBase<FmObjective> FmMcBase
typedef MulticutEmptyVisitor<FmObjective> FmEmptyVisitor
typedef FmMcBase::NodeLabels FmNodeLabels

Public Functions

FusionMove(const ObjectiveType &objective, const SettingsType &settings = SettingsType ())
template <class NODE_MAP>
void fuse(std::initializer_list<const NODE_MAP *> proposals, NODE_MAP *result)
template <class NODE_MAP>
void fuse(const std::vector<const NODE_MAP *> &proposals, NODE_MAP *result)

Private Functions

template <class NODE_MAP>
void fuseImpl(NODE_MAP *result)

Private Members

const ObjectiveType &objective_
const GraphType &graph_
SettingsType settings_
nifty::ufd::Ufd<> ufd_
NodeLabels nodeToDense_
template <class OBJECTIVE>
class FusionMove

Public Types

typedef OBJECTIVE ObjectiveType
typedef ObjectiveType::GraphType GraphType
typedef ObjectiveType::LiftedGraphType LiftedGraphType
typedef GraphType:: template NodeMap<uint64_t> nifty::graph::opt::lifted_multicut::FusionMove::NodeLabels
typedef UndirectedGraph FmGraphType
typedef UndirectedGraph FmLiftedGraphType
typedef LiftedMulticutObjective<FmGraphType, double> FmObjective
typedef LiftedMulticutBase<FmObjective> FmLmcBase
typedef nifty::graph::opt::common::SolverFactoryBase<FmLmcBase> FmLmcFactoryBase
typedef FmLmcBase::NodeLabelsType FmNodeLabelsType

Public Functions

FusionMove(const ObjectiveType &objective, const SettingsType &settings = SettingsType ())
template <class NODE_MAP>
void fuse(std::initializer_list<const NODE_MAP *> proposals, NODE_MAP *result)
template <class NODE_MAP>
void fuse(const std::vector<const NODE_MAP *> &proposals, NODE_MAP *result)

Private Functions

template <class NODE_MAP>
void fuseImpl(NODE_MAP *result)

Private Members

const ObjectiveType &objective_
const GraphType &graph_
const LiftedGraphType &liftedGraph_
SettingsType settings_
nifty::ufd::Ufd<> ufd_
NodeLabels nodeToDense_
template <class PROPPOSAL_GEN>
class FusionMoveBased

Inherits from nifty::graph::opt::multicut::MulticutBase< PROPPOSAL_GEN::ObjectiveType >

Public Types

typedef PROPPOSAL_GEN::ObjectiveType ObjectiveType
typedef ObjectiveType::GraphType GraphType
typedef MulticutBase<ObjectiveType> BaseType
typedef BaseType::VisitorBaseType VisitorBaseType
typedef BaseType::VisitorProxyType VisitorProxyType
typedef BaseType::NodeLabelsType NodeLabelsType
typedef FusionMove<ObjectiveType> FusionMoveType
typedef PROPPOSAL_GEN ProposalGen
typedef ProposalGen::SettingsType ProposalGenSettings
typedef FusionMoveType::SettingsType FusionMoveSettings
typedef GraphType:: template EdgeMap<double> nifty::graph::opt::multicut::FusionMoveBased::EdgeWeights

Public Functions

FusionMoveBased(const ObjectiveType &objective, const SettingsType &settings = SettingsType ())
~FusionMoveBased()
void optimize(NodeLabelsType &nodeLabels, VisitorBaseType *visitor)
const FusionMoveBased<PROPPOSAL_GEN>::ObjectiveType &objective() const
virtual const NodeLabelsType &currentBestNodeLabels()
virtual std::string name() const
virtual void weightsChanged()

Private Functions

void optimizeParallel(NodeLabelsType &nodeLabels, VisitorBaseType *visitor)
void optimizeSerial(NodeLabelsType &nodeLabels, VisitorBaseType *visitor)

Private Members

const ObjectiveType &objective_
const GraphType &graph_
SettingsType settings_
nifty::parallel::ParallelOptions parallelOptions_
std::vector<ProposalGen *> pgens_
std::vector<NodeLabelsType *> solBufferIn_
std::vector<NodeLabelsType *> solBufferOut_
std::vector<FusionMoveType *> fusionMoves_
NodeLabelsType *currentBest_
nifty::parallel::ThreadPool threadPool_
template <class OBJECTIVE>
class FusionMoveBased

Inherits from nifty::graph::opt::lifted_multicut::LiftedMulticutBase< OBJECTIVE >

Public Types

typedef OBJECTIVE ObjectiveType
typedef LiftedMulticutBase<ObjectiveType> BaseType
typedef ObjectiveType::GraphType GraphType
typedef ObjectiveType::LiftedGraphType LiftedGraphType
typedef BaseType::VisitorBaseType VisitorBaseType
typedef BaseType::VisitorProxyType VisitorProxyType
typedef BaseType::NodeLabelsType NodeLabelsType
typedef ProposalGeneratorBase<ObjectiveType> ProposalGeneratorBaseType
typedef ProposalGeneratorFactoryBase<ObjectiveType> ProposalGeneratorFactoryBaseType
typedef WatershedProposalGenerator<ObjectiveType> DefaultProposalGeneratorType
typedef ProposalGeneratorFactory<DefaultProposalGeneratorType> DefaultProposalGeneratorFactoryType

Public Functions

~FusionMoveBased()
FusionMoveBased(const ObjectiveType &objective, const SettingsType &settings = SettingsType ())
void optimize(NodeLabelsType &nodeLabels, VisitorBaseType *visitor)
const FusionMoveBased<OBJECTIVE>::ObjectiveType &objective() const
virtual const NodeLabelsType &currentBestNodeLabels()
virtual std::string name() const

Private Types

typedef FusionMove<ObjectiveType> FusionMoveType

Private Functions

void optimizeSingleThread(VisitorProxyType &visitorProxy)
void optimizeMultiThread(VisitorProxyType &visitorProxy)

Private Members

const ObjectiveType &objective_
SettingsType settings_
const GraphType &graph_
const LiftedGraphType &liftedGraph_
NodeLabelsType *currentBest_
double currentBestEnergy_
nifty::parallel::ParallelOptions parallelOptions_
nifty::parallel::ThreadPool threadPool_
ProposalGeneratorBaseType *proposalGenerator_
std::vector<FusionMoveType *> fusionMoves_
template <class T = long double>
class GaussianCurvature2D

Public Types

typedef nifty::math::NumericTraits<T>::RealPromote ValueType
typedef ValueType value_type

Public Functions

GaussianCurvature2D(const ValueType sigma, int r = -1, const ValueType windowRatio = 3.5)
template <class T0, class T1>
void operator()(const nifty::marray::View<T0> &coordinates, nifty::marray::View<T1> &out, const bool closedLine) const
template <class COORD_ITER, class OUT_ITER>
void operator()(COORD_ITER coordsBegin, COORD_ITER coordsEnd, OUT_ITER outIter, const bool closedLine) const
int radius() const

Private Functions

template <class COORD_ITER, class OUT_ITER>
void impl(COORD_ITER coordsBegin, OUT_ITER outIter, const size_t size, const bool closedLine) const

Private Members

ValueType sigma_
int radius_
std::vector<ValueType> kdx_
std::vector<ValueType> kdxx_
ValueType eps_
struct GaussianGradientMagnitude

Inherits from nifty::features::FilterBase

Public Functions

void operator()(const fastfilters_array2d_t &ff, marray::View<float> &out, const double sigma) const
void operator()(const fastfilters_array3d_t &ff, marray::View<float> &out, const double sigma) const
bool isMultiChannel() const
struct GaussianSmoothing

Inherits from nifty::features::FilterBase

Public Functions

void operator()(const fastfilters_array2d_t &ff, marray::View<float> &out, const double sigma) const
void operator()(const fastfilters_array3d_t &ff, marray::View<float> &out, const double sigma) const
bool isMultiChannel() const
template <class G, class T>
class GeneralizedMeanEdgeMap

Public Types

typedef G GraphType
typedef GraphType:: template EdgeMap<T> nifty::graph::agglo::merge_rules::GeneralizedMeanEdgeMap::MeanEdgeMapType
typedef GraphType:: template EdgeMap<nifty::float16_t> nifty::graph::agglo::merge_rules::GeneralizedMeanEdgeMap::SizeEdgeMapType
typedef GeneralizedMeanSettings SettingsType

Public Functions

auto name() const
template <class VALUES, class WEIGHTS>
GeneralizedMeanEdgeMap(const GraphType &g, const VALUES &values, const WEIGHTS &weights, const SettingsType &settings = SettingsType ())
void merge(const uint64_t aliveEdge, const uint64_t deadEdge)
void setValueFrom(const uint64_t targetEdge, const uint64_t sourceEdge)
void setFrom(const uint64_t targetEdge, const uint64_t sourceEdge)
void set(const uint64_t targetEdge, const T &value, const T &weight)
T operator[](const uint64_t edge) const

Public Static Functions

static auto staticName()

Private Members

MeanEdgeMapType values_
SizeEdgeMapType weights_
SettingsType settings_
struct GeneralizedMeanSettings

Public Functions

GeneralizedMeanSettings(const double p = 1.0)
auto name() const

Public Members

double p
template <size_t DIM>
class Geometry
template <>
template<>
class Geometry<2>

Public Types

typedef array::StaticArray<uint32_t, 2> CoordinateType
typedef array::StaticArray<int64_t, 2> SignedCoordinateType
typedef TopologicalGrid<2> TopologicalGridType

Public Functions

Geometry(const TopologicalGridType &tGrid, const bool fill = false, const bool sort1Cells = true)
template <size_t CELL_TYPE>
const CellGeometryVector<2, CELL_TYPE> &geometry() const

Private Members

std::tuple<CellGeometryVector<2, 0>, CellGeometryVector<2, 1>, CellGeometryVector<2, 2>> geometry_
class gil_release

Private Functions

void releaseGil(bool disassoc = false)
void unreleaseGil()
class Glpk

Public Types

typedef IlpBackendSettings SettingsType

Public Functions

Glpk(const SettingsType &settings = SettingsType ())
~Glpk()
void initModel(const size_t numberOfVariables, const double *coefficients)
template <class Iterator>
void setStart(Iterator valueIterator)
template <class VariableIndexIterator, class CoefficientIterator>
void addConstraint(VariableIndexIterator viBegin, VariableIndexIterator viEnd, CoefficientIterator coefficient, const double lowerBound, const double upperBound)
void optimize()
double label(const size_t variableIndex) const
template <class OBJECTIVE_ITERATOR>
void changeObjective(OBJECTIVE_ITERATOR objectiveIter)

Public Static Functions

static std::string name()

Private Members

SettingsType settings_
size_t nVariables_
glp_prob *lp
int addedConstraints_
template <class GRAPH>
struct GraphName
template <class BASE_GRAPH>
template<>
struct GraphName<PyContractionGraph<BASE_GRAPH>>

Public Static Functions

static std::string name()
static std::string moduleName()
static std::string usageExample()
template <>
template<>
struct GraphName<PyUndirectedGraph>

Public Static Functions

static std::string name()
static std::string moduleName()
static std::string usageExample()
template <size_t DIM, bool SIMPLE_NH>
template<>
struct GraphName<UndirectedGridGraph<DIM, SIMPLE_NH>>

Public Static Functions

static std::string name()
static std::string moduleName()
static std::string usageExample()
template <size_t DIM>
template<>
struct GraphName<UndirectedLongRangeGridGraph<DIM>>

Public Static Functions

static std::string name()
static std::string moduleName()
static std::string usageExample()
template <bool TAKE_UNCUT = true>
struct GraphSubgraphWithCut

Public Functions

template<>
GraphSubgraphWithCut(const ObjectiveType &objective, const IlpSovler &ilpSolver, const DenseIds &denseIds)
template<>
bool useNode(const uint64_t v) const
template<>
bool useEdge(const uint64_t graphEdge) const

Public Members

template<>
const ObjectiveType &objective_
template<>
const IlpSovler &ilpSolver_
template<>
const DenseIds &denseIds_
template <class OBJECTIVE>
class GreedyAdditiveMulticutProposals

Inherits from nifty::graph::opt::common::ProposalGeneratorBase< OBJECTIVE >

Public Types

typedef OBJECTIVE ObjectiveType
typedef ObjectiveType::GraphType GraphType
typedef nifty::graph::opt::MulticutBase<ObjectiveType> Base
typedef MulticutGreedyAdditive<Objective> Solver
typedef Solver::SettingsType SolverSettings
typedef Base::EdgeLabels EdgeLabels
typedef Base::NodeLabels NodeLabels
typedef GraphType:: template NodeMap<uint64_t> nifty::graph::opt::common::GreedyAdditiveMulticutProposals::ProposalType
typedef GraphType:: template EdgeMap<float> nifty::graph::opt::common::GreedyAdditiveMulticutProposals::EdgeWeights

Public Functions

GreedyAdditiveMulticutProposals(const ObjectiveType &objective, const size_t numberOfThreads, const SettingsType &settings = SettingsType ())
void reset()
virtual ~GreedyAdditiveMulticutProposals()
virtual void generateProposal(const ProposalType &currentBest, ProposalType &proposal, const size_t tid)

Private Members

const ObjectiveType &objective_
size_t numberOfThreads_
SettingsType settings_
std::vector<uint64_t> negativeEdges_
EdgeWeights noisyEdgeWeights_
ProposalType seeds_
std::vector<std::mt19937> gens_
std::normal_distribution dist_
std::uniform_int_distribution intDist_
template <class OBJECTIVE>
class GreedyAdditiveProposals

Public Types

typedef OBJECTIVE ObjectiveType
typedef ObjectiveType::GraphType GraphType
typedef MulticutBase<ObjectiveType> Base
typedef MulticutGreedyAdditive<ObjectiveType> Solver
typedef Solver::SettingsType SolverSettings
typedef Base::NodeLabelsType NodeLabelsType

Public Functions

GreedyAdditiveProposals(const ObjectiveType &objective, const SettingsType &settings, const size_t threadIndex)
~GreedyAdditiveProposals()
void generate(const NodeLabelsType &currentBest, NodeLabelsType &proposal)
void reset()

Public Static Functions

static std::string name()

Private Members

const ObjectiveType &objective_
const GraphType graph_
SettingsType settings_
size_t threadIndex_
size_t proposalNumber_
Solver *solver_
template <size_t DIM, class LABELS_PROXY>
class GridRag

Inherits from nifty::graph::UndirectedGraph<>

Public Types

typedef LABELS_PROXY LabelsProxy
typedef GridRag<DIM, LABELS_PROXY> SelfType
typedef array::StaticArray<int64_t, DIM> ShapeType

Public Functions

GridRag(const LabelsProxy &labelsProxy, const SettingsType &settings = SettingsType ())
template <class ITER>
GridRag(const LabelsProxy &labelsProxy, ITER serializationBegin, const SettingsType &settings = SettingsType ())
const LabelsProxy &labelsProxy() const
const ShapeType &shape() const

Protected Types

typedef RefHelper<LABELS_PROXY>::type StorageType

Protected Functions

GridRag(const LabelsProxy &labelsProxy, const SettingsType &settings, const DontComputeRag)

Protected Attributes

SettingsType settings_
StorageType labelsProxy_

Friends

friend nifty::graph::GridRag::detail_rag::ComputeRag< SelfType >
template <class LABELS_PROXY>
class GridRag3DStacked2D
template <class LABEL_PROXY>
class GridRagStacked2D

Inherits from nifty::graph::GridRag< 3, LABEL_PROXY >

Public Types

typedef BaseType::LabelsProxy LabelsProxy
typedef BaseType::SettingsType SettingsType

Public Functions

GridRagStacked2D(const LabelsProxy &labelsProxy, const SettingsType &settings = SettingsType ())
std::pair<uint64_t, uint64_t> minMaxNode(const uint64_t sliceIndex) const
uint64_t numberOfNodes(const uint64_t sliceIndex) const
uint64_t numberOfInSliceEdges(const uint64_t sliceIndex) const
uint64_t numberOfInBetweenSliceEdges(const uint64_t sliceIndex) const
uint64_t inSliceEdgeOffset(const uint64_t sliceIndex) const
uint64_t betweenSliceEdgeOffset(const uint64_t sliceIndex) const

Private Types

typedef LABEL_PROXY LabelsProxyType
typedef GridRag<3, LABEL_PROXY> BaseType
typedef GridRagStacked2D<LABEL_PROXY> SelfType
typedef LabelsProxyType::LabelType LabelType

Private Members

std::vector<PerSliceData> perSliceDataVec_
uint64_t numberOfInSliceEdges_
uint64_t numberOfInBetweenSliceEdges_

Friends

friend nifty::graph::GridRagStacked2D::detail_rag::ComputeRag< SelfType >
class Gurobi

Public Types

typedef IlpBackendSettings SettingsType

Public Functions

Gurobi(const SettingsType &settings = SettingsType ())
~Gurobi()
void initModel(const size_t numberOfVariables, const double *coefficients)
template <class Iterator>
void setStart(Iterator valueIterator)
template <class VariableIndexIterator, class CoefficientIterator>
void addConstraint(VariableIndexIterator viBegin, VariableIndexIterator viEnd, CoefficientIterator coefficient, const double lowerBound, const double upperBound)
void optimize()
double label(const size_t variableIndex) const
template <class OBJECTIVE_ITERATOR>
void changeObjective(OBJECTIVE_ITERATOR objectiveIter)

Public Static Functions

static std::string name()

Private Members

SettingsType settings_
GRBEnv gurobiEnvironment_
GRBModel *gurobiModel_
GRBVar *gurobiVariables_
GRBLinExpr gurobiObjective_
size_t nVariables_
class half

Public Functions

HALF_CONSTEXPR half()
half(detail::expr rhs)
half(float rhs)
operator float() const
half &operator=(detail::expr rhs)
template <typename T>
detail::enable<half&, T>::type operator+=(T rhs)
template <typename T>
detail::enable<half&, T>::type operator-=(T rhs)
template <typename T>
detail::enable<half&, T>::type operator*=(T rhs)
template <typename T>
detail::enable<half&, T>::type operator/=(T rhs)
half &operator=(float rhs)
half &operator+=(float rhs)
half &operator-=(float rhs)
half &operator*=(float rhs)
half &operator/=(float rhs)
half &operator++()
half &operator--()
half operator++(int)
half operator--(int)

Private Functions

HALF_CONSTEXPR half(detail::binary_t, detail::uint16 bits)

Private Members

detail::uint16 data_

Private Static Attributes

const std::float_round_style round_style = (std::float_round_style)(HALF_ROUND_STYLE)

Friends

friend half_float::half::detail::functions
friend half_float::half::detail::unary_specialized< half >
friend half_float::half::detail::binary_specialized< half, half >
friend half_float::half::detail::half_caster
friend half_float::half::std::numeric_limits< half >
template <typename T, typename U, std::float_round_style R = (std::float_round_style)(HALF_ROUND_STYLE)>
struct half_caster
template <std::float_round_style R>
template<>
struct half_caster<half, expr, R>

Inherits from half_float::detail::half_caster< half, half, R >

template <std::float_round_style R>
template<>
struct half_caster<half, half, R>

Subclassed by half_float::detail::half_caster< half, expr, R >

Public Static Functions

static half cast(half arg)
template <typename U, std::float_round_style R>
template<>
struct half_caster<half, U, R>

Public Static Functions

static half cast(U arg)

Private Static Functions

static half cast_impl(U arg, true_type)
static half cast_impl(U arg, false_type)
template <typename T, std::float_round_style R>
template<>
struct half_caster<T, expr, R>

Public Static Functions

static T cast(expr arg)

Private Static Functions

static T cast_impl(float arg, true_type)
static T cast_impl(half arg, false_type)
template <typename T, std::float_round_style R>
template<>
struct half_caster<T, half, R>

Public Static Functions

static T cast(half arg)

Private Static Functions

static T cast_impl(half arg, true_type)
static T cast_impl(half arg, false_type)
template <class T>
class Hdf5Array

Public Functions

template <class SHAPE_ITER, class CHUNK_SHAPE_ITER>
Hdf5Array(const hid_t &groupHandle, const std::string &datasetName, SHAPE_ITER shapeBegin, SHAPE_ITER shapeEnd, CHUNK_SHAPE_ITER chunkShapeBegin, const int compression = -1)
Hdf5Array(const hid_t &groupHandle, const std::string &datasetName)
int setCache()
~Hdf5Array()
uint64_t dimension() const
uint64_t shape(const std::size_t d) const
const std::vector<uint64_t> &shape() const
uint64_t chunkShape(const std::size_t d) const
const std::vector<uint64_t> &chunkShape() const
bool isChunked() const
template <class ITER>
void readSubarray(ITER roiBeginIter, marray::View<T> &out) const
template <class ITER>
void readSubarrayLocked(ITER roiBeginIter, marray::View<T> &out) const
template <class ITER>
void writeSubarray(ITER roiBeginIter, const marray::View<T> &in)
template <class ITER>
void writeSubarrayLocked(ITER roiBeginIter, const marray::View<T> &in) const

Private Functions

template <class BaseIterator, class ShapeIterator>
void loadHyperslab(BaseIterator baseBegin, BaseIterator baseEnd, ShapeIterator shapeBegin, marray::View<T> &out) const
template <class BaseIterator, class ShapeIterator>
void saveHyperslab(BaseIterator baseBegin, BaseIterator baseEnd, ShapeIterator shapeBegin, const marray::View<T> &in)
void loadShape(std::vector<uint64_t> &shapeVec)
void loadChunkShape(std::vector<uint64_t> &chunkShape)

Private Members

hid_t groupHandle_
hid_t dataset_
hid_t datatype_
std::vector<uint64_t> shape_
std::vector<uint64_t> chunkShape_
bool isChunked_
template <std::size_t DIM, class LABEL_TYPE>
class Hdf5Labels

Public Types

typedef tools::BlockStorage<LABEL_TYPE> BlockStorageType
typedef LABEL_TYPE LabelType
typedef const hdf5::Hdf5Array<LABEL_TYPE> Hdf5ArrayType

Public Functions

Hdf5Labels(const Hdf5ArrayType &labels, const uint64_t numberOfLabels)
uint64_t numberOfLabels() const
const array::StaticArray<int64_t, DIM> &shape() const
template <class ROI_BEGIN_COORD, class ROI_END_COORD>
void readSubarray(const ROI_BEGIN_COORD &roiBeginCoord, const ROI_END_COORD &roiEndCoord, marray::View<LABEL_TYPE> &outArray) const
const hdf5::Hdf5Array<LABEL_TYPE> &hdf5Array() const

Private Members

array::StaticArray<int64_t, DIM> shape_
const hdf5::Hdf5Array<LABEL_TYPE> &labels_
int64_t numberOfLabels_
struct HessianOfGaussianEigenvalues

Inherits from nifty::features::FilterBase

Public Functions

void operator()(const fastfilters_array2d_t &ff, marray::View<float> &out, const double sigma) const
void operator()(const fastfilters_array3d_t &ff, marray::View<float> &out, const double sigma) const
bool isMultiChannel() const
template <class WEIGHT_TYPE = float>
class HigherOrderFactor

Public Functions

template <class SIZE_TYPE>
HigherOrderFactor(std::initializer_list<SIZE_TYPE> shape)
const nifty::marray::Marray<WEIGHT_TYPE> &valueTable()

Private Members

nifty::marray::Marray<WEIGHT_TYPE> valueTable_
std::vector<uint64_t> edgeIds_
template <class GRAPH, class WEIGHT_TYPE>
class HigherOrderMulticutObjective

Public Types

typedef GRAPH GraphType
typedef GraphType:: template NodeMap<uint64_t> nifty::graph::opt::higher_order_multicut::HigherOrderMulticutObjective::NodeLabelsType
typedef WEIGHT_TYPE WeightType
typedef graph_maps::EdgeMap<GraphType, WeightType> WeightsMap

Public Functions

HigherOrderMulticutObjective(const GraphType &g)
WeightsMap &weights()
const GraphType &graph() const
const WeightsMap &weights() const
const std::vector<HigherOrderFactor> &higherOrderFactors() const

Private Members

const GraphType &graph_
WeightsMap weights_
std::vector<HigherOrderFactor> higherOrderFactors_
template <class T, class BINCOUNT = float>
class Histogram

Public Types

typedef BINCOUNT BincountType

Public Functions

Histogram(const T minVal = 0, const T maxVal = 1, const size_t bincount = 40)
void assign(const T minVal = 0, const T maxVal = 1, const size_t bincount = 40)
template <class ITER>
void clearSetMinMaxAndFillFrom(ITER begin, ITER end)
void setMinMax(const T minVal, const T maxVal)
const BincountType &operator[](const size_t i) const
size_t numberOfBins() const
BincountType sum() const
void insert(const T &value, const double w = 1.0)
void normalize(const BincountType &targetSum)
void clear()
void clearCounts()
double binToValue(const double fbin) const
float binWidth() const
void merge(const Histogram &other)
double rank(const double q) const

Private Functions

double fbinToValue(double fbin) const
float fbin(T val) const

Private Members

std::vector<BincountType> counts_
T minVal_
T maxVal_
T binWidth_
BincountType sum_
template <class S = std::size_t>
class IFFT

Public Types

typedef S size_type

Public Functions

IFFT(const andres::Marray<std::complex<double>> &in, andres::Marray<double> &out)
~IFFT()
void execute()

Private Members

fftw_plan plan_
struct IlpBackendSettings

Public Types

enum PreSolver

Values:

PRE_SOLVER_AUTO
PRE_SOLVER_PRIMAL
PRE_SOLVER_DUAL
PRE_SOLVER_NONE
PRE_SOLVER_DEFAULT
enum LPSolver

Values:

LP_SOLVER_PRIMAL_SIMPLEX
LP_SOLVER_DUAL_SIMPLEX
LP_SOLVER_BARRIER
LP_SOLVER_SIFTING
LP_SOLVER_DEFAULT

Public Members

double memLimit = {-1.0}
double relativeGap = {0.0}
double absoluteGap = {0.0}
double cutUp = {1.0e+75}
int prePasses = {-1}
PreSolver preSolver = {PRE_SOLVER_DEFAULT}
LPSolver lpSolver = {LP_SOLVER_DEFAULT}
size_t numberOfThreads = {1}
size_t verbosity = {0}
struct InitializationSkipping
template <class OBJECTIVE>
class InterfaceFlipperProposalGenerator

Inherits from nifty::graph::opt::common::ProposalGeneratorBase< OBJECTIVE >

Public Types

typedef OBJECTIVE ObjectiveType
typedef ObjectiveType::GraphType GraphType
typedef GraphType:: template NodeMap<uint64_t> nifty::graph::opt::common::InterfaceFlipperProposalGenerator::ProposalType
typedef GraphType:: template NodeMap<bool> nifty::graph::opt::common::InterfaceFlipperProposalGenerator::IsUsed

Public Functions

InterfaceFlipperProposalGenerator(const ObjectiveType &objective, const size_t numberOfThreads, const SettingsType &settings = SettingsType ())
void reset()
virtual ~InterfaceFlipperProposalGenerator()
virtual void generateProposal(const ProposalType &currentBest, ProposalType &proposal, const size_t tid)

Private Members

const ObjectiveType &objective_
size_t numberOfThreads_
SettingsType settings_
std::vector<std::mt19937> gens_
std::vector<std::unique_ptr<IsUsed>> isUsedVec_
std::uniform_int_distribution binaryDist_
template <typename>
struct is_float

Inherits from half_float::detail::bool_type< false >

template <typename T>
template<>
struct is_float<const T>

Inherits from half_float::detail::is_float< T >

template <typename T>
template<>
struct is_float<volatile const T>

Inherits from half_float::detail::is_float< T >

template <>
template<>
struct is_float<double>

Inherits from half_float::detail::bool_type< true >

template <>
template<>
struct is_float<float>

Inherits from half_float::detail::bool_type< true >

template <>
template<>
struct is_float<long double>

Inherits from half_float::detail::bool_type< true >

template <typename T>
template<>
struct is_float<volatile T>

Inherits from half_float::detail::is_float< T >

template <class T, bool isConst, class A>
class Iterator

Public Types

typedef std::random_access_iterator_tag iterator_category
typedef T value_type
typedef ptrdiff_t difference_type
typedef marray_detail::IfBool<isConst, const T *, T *>::type pointer
typedef marray_detail::IfBool<isConst, const T&, T&>::type reference
typedef marray_detail::IfBool<isConst, const View<T, true, A> *, View<T, false, A> *>::type view_pointer
typedef marray_detail::IfBool<isConst, const View<T, true, A>&, View<T, false, A>&>::type view_reference

Public Functions

Iterator()
Iterator(const View<T, false, A> &view, const std::size_t index = 0)
Iterator(View<T, false, A> &view, const std::size_t index = 0)
Iterator(const View<T, true, A> &view, const std::size_t index = 0)
Iterator(const Iterator<T, false, A> &in)
Iterator<T, isConst, A>::reference operator*() const
Iterator<T, isConst, A>::pointer operator->() const
Iterator<T, isConst, A>::reference operator[](const std::size_t x) const
Iterator<T, isConst, A> &operator+=(const difference_type &x)
Iterator<T, isConst, A> &operator-=(const difference_type &x)
Iterator<T, isConst, A> &operator++()
Iterator<T, isConst, A> &operator--()
Iterator<T, isConst, A> operator++(int)
Iterator<T, isConst, A> operator--(int)
Iterator<T, isConst, A> operator+(const difference_type &x) const
Iterator<T, isConst, A> operator-(const difference_type &x) const
template <bool isConstLocal>
Iterator<T, isConst, A>::difference_type operator-(const Iterator<T, isConstLocal, A> &it) const
template <bool isConstLocal>
bool operator==(const Iterator<T, isConstLocal, A> &it) const
template <bool isConstLocal>
bool operator!=(const Iterator<T, isConstLocal, A> &it) const
template <bool isConstLocal>
bool operator<(const Iterator<T, isConstLocal, A> &it) const
template <bool isConstLocal>
bool operator>(const Iterator<T, isConstLocal, A> &it) const
template <bool isConstLocal>
bool operator<=(const Iterator<T, isConstLocal, A> &it) const
template <bool isConstLocal>
bool operator>=(const Iterator<T, isConstLocal, A> &it) const
bool hasMore() const
std::size_t index() const
template <class CoordinateIterator>
void coordinate(CoordinateIterator it) const

Private Functions

void testInvariant() const

Private Members

view_pointer view_
pointer pointer_
std::size_t index_
std::vector<std::size_t> coordinates_

Friends

friend andres::Iterator::Marray< T, A >
friend andres::Iterator::Iterator< T, !isConst, A >
template <class OBJECTIVE>
class KernighanLin

Inherits from nifty::graph::opt::multicut::MulticutBase< OBJECTIVE >

Public Types

typedef OBJECTIVE ObjectiveType
typedef ObjectiveType::WeightType WeightType
typedef MulticutBase<ObjectiveType> BaseType
typedef BaseType::VisitorBaseType VisitorBaseType
typedef BaseType::VisitorProxyType VisitorProxyType
typedef BaseType::NodeLabelsType NodeLabelsType
typedef ObjectiveType::GraphType GraphType
typedef ObjectiveType::WeightsMap WeightsMap
typedef GraphType:: template EdgeMap<uint8_t> nifty::graph::opt::multicut::KernighanLin::IsDirtyEdge

Public Functions

virtual ~KernighanLin()
KernighanLin(const ObjectiveType &objective, const SettingsType &settings = SettingsType ())
void optimize(NodeLabelsType &nodeLabels, VisitorBaseType *visitor)
const KernighanLin<OBJECTIVE>::ObjectiveType &objective() const
virtual const NodeLabelsType &currentBestNodeLabels()
virtual std::string name() const
virtual void weightsChanged()

Private Functions

template <class NODE_LABELS>
uint64_t maxLabel(const NODE_LABELS &nodeLabels)
double update_bipartition(std::vector<uint64_t> &A, std::vector<uint64_t> &B)

Private Members

const ObjectiveType &objective_
const GraphType &graph_
SettingsType settings_
NodeLabelsType *currentBest_
double currentBestEnergy_
TwoCutBuffers buffer_
struct LaplacianOfGaussian

Inherits from nifty::features::FilterBase

Public Functions

void operator()(const fastfilters_array2d_t &ff, marray::View<float> &out, const double sigma) const
void operator()(const fastfilters_array3d_t &ff, marray::View<float> &out, const double sigma) const
bool isMultiChannel() const
template <class T>
struct LiFo

Inherits from std::stack< T >

Public Functions

const T &nextElement()
template <class GRAPH, bool ENABLE_UCM>
class LiftedAggloClusterPolicy

Public Types

typedef GRAPH GraphType
typedef FloatEdgeMap EdgePrioType
typedef FloatEdgeMap EdgeSizesType
typedef FloatNodeMap NodeSizesType
typedef EdgeContractionGraph<GraphType, SelfType> EdgeContractionGraphType

Public Functions

template <class MERGE_PRIOS, class NOT_MERGE_PRIOS, class IS_MERGE_EDGE, class EDGE_SIZES>
LiftedAggloClusterPolicy(const GraphType&, const MERGE_PRIOS&, const NOT_MERGE_PRIOS&, const IS_MERGE_EDGE&, const EDGE_SIZES&, const SettingsType &settings = SettingsType ())
std::pair<uint64_t, double> edgeToContractNext() const
bool isDone()
LiftedAggloClusterPolicy<GRAPH, ENABLE_UCM>::EdgeContractionGraphType &edgeContractionGraph()
void contractEdge(const uint64_t edgeToContract)
void mergeNodes(const uint64_t aliveNode, const uint64_t deadNode)
void mergeEdges(const uint64_t aliveEdge, const uint64_t deadEdge)
void contractEdgeDone(const uint64_t edgeToContract)
template <class MERGE_PRIOS, class NOT_MERGE_PRIOS, class IS_MERGE_EDGE, class EDGE_SIZES>
LiftedAggloClusterPolicy(const GraphType &graph, const MERGE_PRIOS &mergePrios, const IS_MERGE_EDGE &isMergeEdge, const EDGE_SIZES &edgeSizes, const SettingsType &settings)

Private Types

typedef LiftedAggloClusterPolicy<GRAPH, ENABLE_UCM> SelfType
typedef GRAPH:: template EdgeMap<uint8_t> nifty::graph::agglo::LiftedAggloClusterPolicy::UInt8EdgeMap
typedef GRAPH:: template EdgeMap<double> nifty::graph::agglo::LiftedAggloClusterPolicy::FloatEdgeMap
typedef GRAPH:: template NodeMap<double> nifty::graph::agglo::LiftedAggloClusterPolicy::FloatNodeMap
typedef nifty::tools::ChangeablePriorityQueue<double, std::greater<double>> QueueType

Private Functions

double pqActionPrio(const uint64_t edge) const

Private Members

const GraphType &graph_
EdgePrioType mergePrios_
EdgePrioType notMergePrios_
UInt8EdgeMap isMergeEdge_
EdgeSizesType edgeSizes_
SettingsType settings_
EdgeContractionGraphType edgeContractionGraph_
QueueType pq_
uint64_t edgeToContractNext_
double edgeToContractNextMergePrio_

Friends

friend nifty::graph::agglo::LiftedAggloClusterPolicy::EdgeContractionGraph< GraphType, SelfType, ENABLE_UCM >
template <class GRAPH, class ACC, bool ENABLE_UCM>
class LiftedGraphEdgeWeightedClusterPolicy

Public Types

typedef AccType::SettingsType AccSettingsType
typedef GRAPH GraphType
typedef FloatEdgeMap EdgePrioType
typedef FloatEdgeMap EdgeSizesType
typedef FloatNodeMap NodeSizesType
typedef EdgeContractionGraph<GraphType, SelfType> EdgeContractionGraphType
typedef GRAPH GraphType
typedef EDGE_INDICATORS EdgeIndicatorsType
typedef EDGE_SIZES EdgeSizesType
typedef NODE_SIZES NodeSizesType
typedef EDGE_IS_LIFTED EdgeIsLifted
typedef EdgeWeightedClusterPolicySettings SettingsType
typedef EdgeContractionGraph<GraphType, SelfType> EdgeContractionGraphType

Public Functions

template <class MERGE_PRIOS, class IS_LOCAL_EDGE, class EDGE_SIZES>
LiftedGraphEdgeWeightedClusterPolicy(const GraphType &graph, const MERGE_PRIOS &mergePrios, const IS_LOCAL_EDGE &isLocalEdge, const EDGE_SIZES &edgeSizes, const SettingsType &settings = SettingsType ())
std::pair<uint64_t, double> edgeToContractNext() const
bool isDone()
LiftedGraphEdgeWeightedClusterPolicy<GRAPH, EDGE_INDICATORS, EDGE_SIZES, NODE_SIZES, EDGE_IS_LIFTED, ENABLE_UCM>::EdgeContractionGraphType &edgeContractionGraph()
void contractEdge(const uint64_t edgeToContract)
void mergeNodes(const uint64_t aliveNode, const uint64_t deadNode)
void mergeEdges(const uint64_t aliveEdge, const uint64_t deadEdge)
void contractEdgeDone(const uint64_t edgeToContract)
LiftedGraphEdgeWeightedClusterPolicy(const GraphType &graph, EdgeIndicatorsType edgeIndicators, EdgeSizesType edgeSizes, NodeSizesType nodeSizes, EdgeIsLifted edgeIsLifted, const SettingsType &settings = SettingsType ())
std::pair<uint64_t, double> edgeToContractNext() const
bool isDone() const
EdgeContractionGraphType &edgeContractionGraph()
void contractEdge(const uint64_t edgeToContract)
void mergeNodes(const uint64_t aliveNode, const uint64_t deadNode)
void mergeEdges(const uint64_t aliveEdge, const uint64_t deadEdge)
void contractEdgeDone(const uint64_t edgeToContract)

Private Types

typedef LiftedGraphEdgeWeightedClusterPolicy<GRAPH, ACC, ENABLE_UCM> SelfType
typedef GRAPH:: template EdgeMap<uint8_t> nifty::graph::agglo::LiftedGraphEdgeWeightedClusterPolicy::UInt8EdgeMap
typedef GRAPH:: template EdgeMap<double> nifty::graph::agglo::LiftedGraphEdgeWeightedClusterPolicy::FloatEdgeMap
typedef GRAPH:: template NodeMap<double> nifty::graph::agglo::LiftedGraphEdgeWeightedClusterPolicy::FloatNodeMap
typedef ACC AccType
typedef nifty::tools::ChangeablePriorityQueue<double, std::greater<double>> QueueType
typedef LiftedGraphEdgeWeightedClusterPolicy<GRAPH, EDGE_INDICATORS, EDGE_SIZES, NODE_SIZES, EDGE_IS_LIFTED, ENABLE_UCM> SelfType
typedef GraphType:: template EdgeMap<double> nifty::graph::agglo::LiftedGraphEdgeWeightedClusterPolicy::CurrentWeightMap
typedef nifty::tools::ChangeablePriorityQueue<double, std::less<double>> QueueType

Private Functions

double pqMergePrio(const uint64_t edge) const
void initializeWeights()
double computeWeight(const uint64_t edge) const

Private Members

const GraphType &graph_
ACC acc_
UInt8EdgeMap isLocalEdge_
UInt8EdgeMap isPureLocal_
UInt8EdgeMap isPureLifted_
SettingsType settings_
EdgeContractionGraphType edgeContractionGraph_
QueueType pq_
uint64_t edgeToContractNext_
double edgeToContractNextMergePrio_
EdgeIndicatorsType edgeIndicators_
EdgeSizesType edgeSizes_
NodeSizesType nodeSizes_
EdgeIsLifted edgeIsLifted_
CurrentWeightMap currentWeight_

Friends

friend nifty::graph::agglo::LiftedGraphEdgeWeightedClusterPolicy::EdgeContractionGraph< GraphType, SelfType, ENABLE_UCM >
template <class OBJECTIVE>
class LiftedMulticutAndresGreedyAdditive

Inherits from nifty::graph::opt::lifted_multicut::LiftedMulticutBase< OBJECTIVE >

Public Types

typedef OBJECTIVE ObjectiveType
typedef LiftedMulticutBase<ObjectiveType> BaseType
typedef ObjectiveType::GraphType GraphType
typedef ObjectiveType::LiftedGraphType LiftedGraphType
typedef BaseType::VisitorBaseType VisitorBaseType
typedef BaseType::VisitorProxyType VisitorProxyType
typedef BaseType::NodeLabelsType NodeLabelsType

Public Functions

virtual ~LiftedMulticutAndresGreedyAdditive()
LiftedMulticutAndresGreedyAdditive(const ObjectiveType &objective, const SettingsType &settings = SettingsType ())
void optimize(NodeLabelsType &nodeLabels, VisitorBaseType *visitor)
const LiftedMulticutAndresGreedyAdditive<OBJECTIVE>::ObjectiveType &objective() const
virtual const NodeLabelsType &currentBestNodeLabels()
virtual std::string name() const

Private Members

const ObjectiveType &objective_
SettingsType settings_
const GraphType &graph_
const LiftedGraphType &liftedGraph_
NodeLabelsType *currentBest_
andres::graph::Graph aGraph_
andres::graph::Graph aLiftedGraph_
std::vector<double> edgeCosts_
template <class OBJECTIVE>
class LiftedMulticutAndresKernighanLin

Inherits from nifty::graph::opt::lifted_multicut::LiftedMulticutBase< OBJECTIVE >

Public Types

typedef OBJECTIVE ObjectiveType
typedef LiftedMulticutBase<ObjectiveType> BaseType
typedef ObjectiveType::GraphType GraphType
typedef ObjectiveType::LiftedGraphType LiftedGraphType
typedef BaseType::VisitorBaseType VisitorBaseType
typedef BaseType::VisitorProxyType VisitorProxy
typedef BaseType::NodeLabelsType NodeLabelsType

Public Functions

virtual ~LiftedMulticutAndresKernighanLin()
LiftedMulticutAndresKernighanLin(const ObjectiveType &objective, const SettingsType &settings = SettingsType ())
void optimize(NodeLabelsType &nodeLabels, VisitorBaseType *visitor)
const LiftedMulticutAndresKernighanLin<OBJECTIVE>::ObjectiveType &objective() const
virtual const NodeLabelsType &currentBestNodeLabels()
virtual std::string name() const

Private Members

const ObjectiveType &objective_
SettingsType settings_
const GraphType &graph_
const LiftedGraphType &liftedGraph_
NodeLabelsType *currentBest_
andres::graph::Graph aGraph_
andres::graph::Graph aLiftedGraph_
std::vector<double> edgeCosts_
template <class OBJECTIVE>
class LiftedMulticutBase

Inherits from nifty::graph::opt::common::SolverBase< OBJECTIVE, LiftedMulticutBase< OBJECTIVE > >

Subclassed by nifty::graph::opt::lifted_multicut::ChainedSolvers< OBJECTIVE >, nifty::graph::opt::lifted_multicut::FusionMoveBased< OBJECTIVE >, nifty::graph::opt::lifted_multicut::LiftedMulticutAndresGreedyAdditive< OBJECTIVE >, nifty::graph::opt::lifted_multicut::LiftedMulticutAndresKernighanLin< OBJECTIVE >, nifty::graph::opt::lifted_multicut::LiftedMulticutGreedyAdditive< OBJECTIVE >, nifty::graph::opt::lifted_multicut::LiftedMulticutIlp< OBJECTIVE, ILP_SOLVER >, nifty::graph::opt::lifted_multicut::LiftedMulticutKernighanLin< OBJECTIVE >, nifty::graph::opt::lifted_multicut::LiftedMulticutMp< OBJECTIVE >, nifty::graph::opt::lifted_multicut::PyLiftedMulticutBase< OBJECTIVE >

template <class OBJECTIVE>
class LiftedMulticutGreedyAdditive

Inherits from nifty::graph::opt::lifted_multicut::LiftedMulticutBase< OBJECTIVE >

Public Types

typedef OBJECTIVE ObjectiveType
typedef ObjectiveType::GraphType GraphType
typedef ObjectiveType::LiftedGraph LiftedGraph
typedef detail_lifted_multicut_greedy_additive::LiftedMulticutGreedyAdditiveCallback<ObjectiveType> Callback
typedef LiftedMulticutBase<OBJECTIVE> BaseType
typedef BaseType::VisitorBaseType VisitorBaseType
typedef BaseType::NodeLabelsType NodeLabelsType
typedef Callback::SettingsType SettingsType

Public Functions

virtual ~LiftedMulticutGreedyAdditive()
LiftedMulticutGreedyAdditive(const ObjectiveType &objective, const SettingsType &settings = SettingsType ())
void optimize(NodeLabelsType &nodeLabels, VisitorBaseType *visitor)
const LiftedMulticutGreedyAdditive<OBJECTIVE>::ObjectiveType &objective() const
void reset()
void changeSettings(const SettingsType &settings)
virtual void weightsChanged()
virtual const NodeLabelsType &currentBestNodeLabels()
virtual std::string name() const

Private Members

const ObjectiveType &objective_
const GraphType &graph_
NodeLabelsType *currentBest_
Callback callback_
EdgeContractionGraph<LiftedGraph, Callback> edgeContractionGraph_
template <class OBJECTIVE, class ILP_SOLVER>
class LiftedMulticutIlp

Inherits from nifty::graph::opt::lifted_multicut::LiftedMulticutBase< OBJECTIVE >

Public Types

typedef OBJECTIVE ObjectiveType
typedef LiftedMulticutBase<OBJECTIVE> BaseType
typedef BaseType::VisitorBaseType VisitorBaseType
typedef BaseType::VisitorProxyType VisitorProxyType
typedef BaseType::NodeLabelsType NodeLabelsType
typedef ILP_SOLVER IlpSovler
typedef IlpSovler::SettingsType IlpSettings
typedef ObjectiveType::GraphType GraphType
typedef ObjectiveType::LiftedGraph LiftedGraph

Public Functions

virtual ~LiftedMulticutIlp()
LiftedMulticutIlp(const ObjectiveType &objective, const SettingsType &settings = SettingsType ())
void optimize(NodeLabelsType &nodeLabels, VisitorBaseType *visitor)
const LiftedMulticutIlp<OBJECTIVE, ILP_SOLVER>::ObjectiveType &objective() const
virtual const NodeLabelsType &currentBestNodeLabels()
virtual std::string name() const
virtual void weightsChanged()

Private Types

typedef ComponentsUfd<GraphType> Components
typedef detail_graph::EdgeIndicesToContiguousEdgeIndices<LiftedGraph> DenseIds
typedef DepthFirstSearch<GraphType> DfsType

Private Functions

void addThreeCyclesConstraintsExplicitly(const IlpSovler &ilpSolver)
void initializeIlp()
void repairSolution(NodeLabelsType &nodeLabels)
size_t addViolatedInequalities(const bool searchForCutConstraitns, VisitorProxyType &visitor)
void addThreeCyclesConstraintsExplicitly()

Private Members

const ObjectiveType &objective_
const GraphType &graph_
const LiftedGraph &liftedGraph_
IlpSovler *ilpSolver_
Components components_
DenseIds denseIds_
BidirectionalBreadthFirstSearch<GraphType> bibfs_
DfsType dfs_
SettingsType settings_
std::vector<size_t> variables_
std::vector<double> coefficients_
NodeLabelsType *currentBest_
size_t addedConstraints_
size_t numberOfOptRuns_
template <class OBJECTIVE>
class LiftedMulticutKernighanLin

Inherits from nifty::graph::opt::lifted_multicut::LiftedMulticutBase< OBJECTIVE >

Public Types

typedef OBJECTIVE ObjectiveType
typedef LiftedMulticutBase<ObjectiveType> BaseType
typedef ObjectiveType::GraphType GraphType
typedef ObjectiveType::LiftedGraphType LiftedGraphType
typedef BaseType::VisitorBaseType VisitorBaseType
typedef BaseType::VisitorProxyType VisitorProxyType
typedef BaseType::NodeLabelsType NodeLabelsType

Public Functions

virtual ~LiftedMulticutKernighanLin()
LiftedMulticutKernighanLin(const ObjectiveType &objective, const SettingsType &settings = SettingsType ())
void optimize(NodeLabelsType &nodeLabels, VisitorBaseType *visitor)
const LiftedMulticutKernighanLin<OBJECTIVE>::ObjectiveType &objective() const
const LiftedMulticutKernighanLin<OBJECTIVE>::NodeLabelsType &currentBestNodeLabels()
std::string name() const
double currentBestEnergy()

Private Types

typedef detail_kernighang_lin::TwoCut<ObjectiveType> TwoCutType
typedef ComponentsUfd<GraphType> ComponentsType
typedef detail_kernighang_lin::TwoCutBuffers<GraphType> TwoCutBuffersType
typedef subgraph_masks::SubgraphWithCutFromNodeLabels<GraphType, NodeLabelsType> SubgraphWithCut

Private Functions

void initializePartiton()
void buildRegionAdjacencyGraph()
void optimizePairs(double &energyDecrease)
void introduceNewPartitions(double &energyDecrease)
void connectedComponentLabeling()
bool hasChanges()
void formNewPartition()
void checkIfPartitonChanged()

Private Members

const ObjectiveType &objective_
SettingsType settings_
const GraphType &graph_
const LiftedGraphType &liftedGraph_
NodeLabelsType *currentBest_
double currentBestEnergy_
TwoCutType twoCut_
ComponentsType components_
std::vector<std::vector<uint64_t>> partitions_
TwoCutBuffersType twoCutBuffers_
NodeLabelsType lastGoodVertexLabels_
GraphType:: template NodeMap<uint8_t> nifty::graph::opt::lifted_multicut::LiftedMulticutKernighanLin::visited_
std::vector<uint8_t> changed_
std::vector<std::unordered_set<uint64_t>> edges_
uint64_t numberOfComponents_
template <class OBJECTIVE>
class LiftedMulticutMp

Inherits from nifty::graph::opt::lifted_multicut::LiftedMulticutBase< OBJECTIVE >

Public Types

typedef OBJECTIVE ObjectiveType
typedef LiftedMulticutBase<ObjectiveType> BaseType
typedef ObjectiveType::GraphType GraphType
typedef ObjectiveType::LiftedGraphType LiftedGraphType
typedef BaseType::VisitorBaseType VisitorBaseType
typedef BaseType::VisitorProxyType VisitorProxy
typedef BaseType::NodeLabelsType NodeLabels
typedef nifty::graph::opt::common::SolverFactoryBase<BaseType> LmcFactoryBase
typedef LP_MP::FMC_LIFTED_MULTICUT<LiftedRounder> FMC
typedef LP_MP::Solver<FMC, LP_MP::LP, LP_MP::StandardTighteningVisitor, LiftedRounder> SolverBase
typedef LP_MP::ProblemConstructorRoundingSolver<SolverBase> SolverType

Public Functions

LiftedMulticutMp(const ObjectiveType &objective, const SettingsType &settings = SettingsType ())
void optimize(NodeLabels &nodeLabels, VisitorBaseType *visitor)
virtual ~LiftedMulticutMp()
virtual const ObjectiveType &objective() const
virtual const NodeLabels &currentBestNodeLabels()
virtual std::string name() const

Private Functions

void initializeMp()
void nodeLabeling()
std::vector<std::string> toOptionsVector() const

Private Members

const ObjectiveType &objective_
SettingsType settings_
const GraphType &graph_
const LiftedGraphType &liftedGraph_
NodeLabels *currentBest_
SolverType *mpSolver_
ufd::Ufd<uint64_t> ufd_
template <class GRAPH, class WEIGHT_TYPE>
class LiftedMulticutObjective

Inherits from nifty::graph::opt::lifted_multicut::LiftedMulticutObjectiveBase< LiftedMulticutObjective< GRAPH, WEIGHT_TYPE >, GRAPH, UndirectedGraph<>, WEIGHT_TYPE >

Public Types

typedef GRAPH GraphType
typedef UndirectedGraph LiftedGraphType
typedef GraphType:: template NodeMap<uint64_t> nifty::graph::opt::lifted_multicut::LiftedMulticutObjective::NodeLabelsType
typedef LiftedGraphType LiftedGraph
typedef WEIGHT_TYPE WeightType
typedef graph_maps::EdgeMap<LiftedGraph, WeightType> WeightsMapType
typedef WeightsMapType WeightsMap

Public Functions

LiftedMulticutObjective(const GraphType &graph, const int64_t reserveAdditionalEdges = -1)
std::pair<bool, uint64_t> setCost(const uint64_t u, const uint64_t v, const WeightType &w = 0.0, const bool overwrite = false)
WeightsMap &weights()
const WeightsMap &weights() const
const GraphType &graph() const
const LiftedGraph &liftedGraph() const
void insertLiftedEdgesBfs(const std::size_t maxDistance)
template <class DIST_VEC_TYPE>
void insertLiftedEdgesBfs(const std::size_t maxDistance, DIST_VEC_TYPE &distVec)
int64_t graphEdgeInLiftedGraph(const uint64_t graphEdge) const
int64_t liftedGraphEdgeInGraph(const uint64_t liftedGraphEdge) const
template <class F>
void forEachGraphEdge(F &&f) const
template <class F>
void parallelForEachGraphEdge(parallel::ThreadPool &threadpool, F &&f) const
template <class F>
void forEachLiftedeEdge(F &&f) const
template <class F>
void parallelForEachLiftedeEdge(parallel::ThreadPool &threadpool, F &&f) const

Protected Attributes

const GraphType &graph_
LiftedGraph liftedGraph_
WeightsMap weights_

Private Types

typedef std::is_same<typename GRAPH::NodeIdTag, ContiguousTag> GraphHasContiguousNodeIds
template <class CHILD_OBJECTIVE, class GRAPH, class LIFTED_GRAPH, class WEIGHT_TYPE>
class LiftedMulticutObjectiveBase

Public Types

typedef CHILD_OBJECTIVE ChildObjective
typedef LiftedMulticutObjectiveBase<ChildObjective, GRAPH, LIFTED_GRAPH, WEIGHT_TYPE> Self

Public Functions

template <class NODE_LABELS>
WEIGHT_TYPE evalNodeLabels(const NODE_LABELS &nodeLabels) const
uint64_t numberOfLiftedEdges() const

Private Functions

ChildObjective &_child()
const ChildObjective &_child() const
template <class OBJECTIVE>
struct LiftedMulticutObjectiveName
template <class GRAPH, class T>
template<>
struct LiftedMulticutObjectiveName<LearnableLiftedMulticutObjective<GRAPH, T>>

Public Static Functions

static std::string name()
template <class GRAPH>
template<>
struct LiftedMulticutObjectiveName<PyDefaultMulticutObjective<GRAPH>>

Public Static Functions

static std::string name()
struct LiftedRounder

Public Types

template<>
typedef UndirectedGraph GraphType
template<>
typedef LiftedMulticutObjective<GraphType, typename ObjectiveType::WeightType> PrimalRounderObjectiveType
template<>
typedef LiftedMulticutBase<PrimalRounderObjectiveType> PrimalRounderBaseType
template<>
typedef PrimalRounderObjectiveType::LiftedGraphType PrimalRounderLiftedGraphType
template<>
typedef PrimalRounderBaseType::NodeLabelsType PrimalRounderNodeLabels
template<>
typedef nifty::graph::opt::common::SolverFactoryBase<PrimalRounderBaseType> PrimalRounderLmcFactoryBase

Public Functions

template<>
LiftedRounder(std::shared_ptr<PrimalRounderLmcFactoryBase> factory, const bool greedyWarmstart)
template<>
std::vector<char> operator()(GraphType &&originalGraph, PrimalRounderLiftedGraphType &&liftedGraph, std::vector<double> &&edgeValues)
template<>
std::vector<char> operator()(GraphType&&, std::vector<double>&&)

Public Static Functions

template<>
static std::string name()

Private Members

template<>
std::shared_ptr<PrimalRounderLmcFactoryBase> factory_
template<>
bool greedyWarmstart_
template <class SOLVER>
class LoggingVisitor

Inherits from nifty::graph::opt::common::VisitorBase< SOLVER >

Public Types

typedef SOLVER SolverType
typedef nifty::tools::Timer TimerType

Public Functions

LoggingVisitor(const int visitNth = 1, const bool verbose = true, const double timeLimitSolver = std::numeric_limits< double >::infinity(), const double timeLimitTotal = std::numeric_limits< double >::infinity(), const nifty::logging::LogLevel logLevel = nifty::logging::LogLevel::WARN)
virtual void begin(SolverType *)
virtual bool visit(SolverType *solver)
virtual void end(SolverType *solver)
virtual void clearLogNames()
virtual void addLogNames(std::initializer_list<std::string> logNames)
virtual void setLogValue(const std::size_t logIndex, double logValue)
virtual void printLog(const nifty::logging::LogLevel logLevel, const std::string &logString)
void stopOptimize()
const std::vector<uint32_t> &iterations() const
const std::vector<double> &energies() const
const std::vector<double> &runtimes() const

Private Functions

void checkRuntime()

Private Members

int visitNth_
bool verbose_
bool runOpt_
int iter_
double timeLimitTotal_
double timeLimitSolver_
double runtimeSolver_
double runtimeTotal_
nifty::logging::LogLevel logLevel_
TimerType timerSolver_
TimerType timerTotal_
std::vector<std::string> logNames_
std::vector<double> logValues_
std::vector<uint32_t> iterations_
std::vector<double> energies_
std::vector<double> runtimes_
template <class GRAPH, bool ENABLE_UCM>
class MalaClusterPolicy

Public Types

typedef GRAPH GraphType
typedef FloatEdgeMap EdgeIndicatorsType
typedef FloatEdgeMap EdgeSizesType
typedef FloatNodeMap NodeSizesType
typedef UInt64EdgeMap MergeTimesType
typedef EdgeContractionGraph<GraphType, SelfType> EdgeContractionGraphType

Public Functions

template <class EDGE_INDICATORS, class EDGE_SIZES, class NODE_SIZES>
MalaClusterPolicy(const GraphType &graph, const EDGE_INDICATORS &edgeIndicators, const EDGE_SIZES &edgeSizes, const NODE_SIZES &nodeSizes, const SettingsType &settings = SettingsType ())
std::pair<uint64_t, double> edgeToContractNext() const
bool isDone() const
MalaClusterPolicy<GRAPH, ENABLE_UCM>::EdgeContractionGraphType &edgeContractionGraph()
void contractEdge(const uint64_t edgeToContract)
void mergeNodes(const uint64_t aliveNode, const uint64_t deadNode)
void mergeEdges(const uint64_t aliveEdge, const uint64_t deadEdge)
void contractEdgeDone(const uint64_t edgeToContract)
const EdgeIndicatorsType &edgeIndicators() const
const EdgeSizesType &edgeSizes() const
const MergeTimesType &mergeTimes() const
const NodeSizesType &nodeSizes() const

Private Types

typedef MalaClusterPolicy<GRAPH, ENABLE_UCM> SelfType
typedef GRAPH:: template EdgeMap<uint64_t> nifty::graph::agglo::MalaClusterPolicy::UInt64EdgeMap
typedef GRAPH:: template EdgeMap<double> nifty::graph::agglo::MalaClusterPolicy::FloatEdgeMap
typedef GRAPH:: template NodeMap<double> nifty::graph::agglo::MalaClusterPolicy::FloatNodeMap
typedef nifty::histogram::Histogram<float> HistogramType
typedef GRAPH:: template EdgeMap<HistogramType> nifty::graph::agglo::MalaClusterPolicy::EdgeHistogramMap
typedef nifty::tools::ChangeablePriorityQueue<double, std::less<double>> QueueType

Private Functions

float histogramToMedian(const uint64_t edge) const

Private Members

const GraphType &graph_
EdgeIndicatorsType edgeIndicators_
EdgeSizesType edgeSizes_
NodeSizesType nodeSizes_
MergeTimesType mergeTimes_
SettingsType settings_
EdgeContractionGraphType edgeContractionGraph_
QueueType pq_
EdgeHistogramMap histograms_
uint64_t time_

Private Static Attributes

const size_t NumberOfBins = 20

Friends

friend nifty::graph::agglo::MalaClusterPolicy::EdgeContractionGraph< GraphType, SelfType, ENABLE_UCM >
template <class T, class A>
class Marray

Inherits from andres::View< T, false, A >

Public Types

typedef View<T, false, A> base
typedef base::value_type value_type
typedef base::pointer pointer
typedef base::const_pointer const_pointer
typedef base::reference reference
typedef base::const_reference const_reference
typedef base::iterator iterator
typedef base::reverse_iterator reverse_iterator
typedef base::const_iterator const_iterator
typedef base::const_reverse_iterator const_reverse_iterator
typedef A::template rebind<value_type>::other andres::Marray::allocator_type

Public Functions

Marray(const allocator_type &allocator = allocator_type ())
Marray(const T &value, const CoordinateOrder &coordinateOrder = defaultOrder, const allocator_type &allocator = allocator_type ())
template <class ShapeIterator>
Marray(ShapeIterator begin, ShapeIterator end, const T &value = T(), const CoordinateOrder &coordinateOrder = defaultOrder, const allocator_type &allocator = allocator_type ())
template <class ShapeIterator>
Marray(const InitializationSkipping &is, ShapeIterator begin, ShapeIterator end, const CoordinateOrder &coordinateOrder = defaultOrder, const allocator_type &allocator = allocator_type ())
Marray(const Marray<T, A> &in)
template <class E, class Te>
Marray(const ViewExpression<E, Te> &expression, const allocator_type &allocator = allocator_type ())
template <class TLocal, bool isConstLocal, class ALocal>
Marray(const View<TLocal, isConstLocal, ALocal> &in)
~Marray()
Marray<T, A> &operator=(const T &value)
Marray<T, A> &operator=(const Marray<T, A> &in)
template <class TLocal, bool isConstLocal, class ALocal>
Marray<T, A> &operator=(const View<TLocal, isConstLocal, ALocal> &in)
template <class E, class Te>
Marray<T, A> &operator=(const ViewExpression<E, Te> &expression)
void assign(const allocator_type &allocator = allocator_type ())
template <class ShapeIterator>
void resize(ShapeIterator begin, ShapeIterator end, const T &value = T())
template <class ShapeIterator>
void resize(const InitializationSkipping &is, ShapeIterator begin, ShapeIterator end)

Private Types

typedef base::geometry_type geometry_type

Private Functions

void testInvariant() const
template <bool SKIP_INITIALIZATION, class ShapeIterator>
void resizeHelper(ShapeIterator begin, ShapeIterator end, const T &value = T())

Private Members

allocator_type dataAllocator_
template <class G, class T>
class MaxEdgeMap

Public Types

typedef G GraphType
typedef GraphType:: template EdgeMap<T> nifty::graph::agglo::merge_rules::MaxEdgeMap::MaxEdgeMapType
typedef GraphType:: template EdgeMap<nifty::float16_t> nifty::graph::agglo::merge_rules::MaxEdgeMap::SizeEdgeMapType
typedef MaxSettings SettingsType

Public Functions

auto name() const
template <class VALUES, class WEIGHTS>
MaxEdgeMap(const GraphType &g, const VALUES &values, const WEIGHTS &weights, const SettingsType &settings = SettingsType ())
void merge(const uint64_t aliveEdge, const uint64_t deadEdge)
void setValueFrom(const uint64_t targetEdge, const uint64_t sourceEdge)
void setFrom(const uint64_t targetEdge, const uint64_t sourceEdge)
void set(const uint64_t targetEdge, const T &value, const T &weight)
T operator[](const uint64_t edge) const

Public Static Functions

static auto staticName()

Private Members

MaxEdgeMapType values_
template <class GRAPH, class T>
class MaxMerging

Public Functions

MaxMerging(const SettingsType &settings = SettingsType ())
void set(const uint64_t edge, const T val)
void get(const uint64_t edge, const T val) const
void merge(const uint64_t aliveEdge, const uint64_t deadEdge)

Public Members

MaxMerging::SettingsType = { }

Private Types

typedef GRAPH:: template EdgeMap<double> MaxMerging::FloatEdgeMap

Private Members

FloatEdgeMap values_
struct MaxSettings

Public Functions

auto name() const
template <class OBJECTIVE>
class MincutBase

Inherits from nifty::graph::opt::common::SolverBase< OBJECTIVE, MincutBase< OBJECTIVE > >

Subclassed by nifty::graph::opt::mincut::MincutGreedyAdditive< OBJECTIVE >, nifty::graph::opt::mincut::MincutQpbo< OBJECTIVE >, nifty::graph::opt::mincut::PyMincutBase< OBJECTIVE >

template <class OBJECTIVE>
class MincutCcFusionMove

Public Types

typedef OBJECTIVE ObjectiveType
typedef ObjectiveType::GraphType GraphType
typedef GraphType:: template NodeMap<uint64_t> nifty::graph::opt::mincut::MincutCcFusionMove::NodeLabelsType
typedef UndirectedGraph FmGraph
typedef MincutObjective<FmGraph, double> FmObjective
typedef MincutBase<FmObjective> FmMcBase
typedef nifty::graph::opt::common::SolverFactoryBase<FmMcBase> FmMcFactoryBase
typedef MincutEmptyVisitor<FmObjective> FmEmptyVisitor
typedef FmMcBase::NodeLabelsType FmNodeLabelsType

Public Functions

MincutCcFusionMove(const ObjectiveType &objective, const SettingsType &settings = SettingsType ())
template <class NODE_MAP>
void fuse(std::initializer_list<const NODE_MAP *> proposals, NODE_MAP *result)
template <class NODE_MAP>
void fuse(const std::vector<const NODE_MAP *> &proposals, NODE_MAP *result)

Private Functions

template <class NODE_MAP>
void fuseImpl(NODE_MAP *result)

Private Members

const ObjectiveType &objective_
const GraphType &graph_
SettingsType settings_
nifty::ufd::Ufd<> ufd_
NodeLabelsType nodeToDense_
template <class OBJECTIVE>
class MincutCcFusionMoveBased

Inherits from nifty::graph::opt::common::detail_cc_fusion::CcFusionMoveBasedImpl< OBJECTIVE, MincutBase< OBJECTIVE >, MincutCcFusionMove< OBJECTIVE > >

Public Types

typedef OBJECTIVE ObjectiveType
typedef nifty::graph::opt::common::detail_cc_fusion::CcFusionMoveBasedImpl<OBJECTIVE, MincutBase<OBJECTIVE>, MincutCcFusionMove<OBJECTIVE>> BaseType
typedef BaseType::SettingsType SettingsType

Public Functions

virtual ~MincutCcFusionMoveBased()
MincutCcFusionMoveBased(const ObjectiveType &objective, const SettingsType &settings = SettingsType ())
template <class OBJECTIVE>
class MincutGreedyAdditive

Inherits from nifty::graph::opt::mincut::MincutBase< OBJECTIVE >

Public Types

typedef float QpboValueType
typedef OBJECTIVE ObjectiveType
typedef ObjectiveType::GraphType GraphType
typedef detail_mincut_greedy_additive::MincutGreedyAdditiveCallback<ObjectiveType> CallbackType
typedef nifty::graph::EdgeContractionGraph<GraphType, CallbackType> ContractionGraphType
typedef MincutBase<OBJECTIVE> BaseType
typedef BaseType::VisitorBaseType VisitorBaseType
typedef BaseType::VisitorProxyType VisitorProxyType
typedef BaseType::NodeLabelsType NodeLabelsType
typedef CallbackType::SettingsType SettingsType

Public Functions

virtual ~MincutGreedyAdditive()
MincutGreedyAdditive(const ObjectiveType &objective, const SettingsType &settings = SettingsType ())
void optimize(NodeLabelsType &nodeLabels, VisitorBaseType *visitor)
const MincutGreedyAdditive<OBJECTIVE>::ObjectiveType &objective() const
void reset()
void changeSettings(const SettingsType &settings)
virtual void weightsChanged()
virtual const NodeLabelsType &currentBestNodeLabels()
virtual double currentBestEnergy()
virtual std::string name() const

Private Members

const ObjectiveType &objective_
const GraphType &graph_
NodeLabelsType *currentBest_
double currentBestEnergy_
CallbackType callback_
ContractionGraphType edgeContractionGraph_
QPBO<QpboValueType> qpbo_
template <class GRAPH, class WEIGHT_TYPE>
class MincutObjective

Inherits from nifty::graph::opt::mincut::MincutObjectiveBase< MincutObjective< GRAPH, WEIGHT_TYPE >, GRAPH, WEIGHT_TYPE >

Public Types

typedef GRAPH GraphType
typedef WEIGHT_TYPE WeightType
typedef graph_maps::EdgeMap<GraphType, WeightType> WeightsMap
typedef GraphType:: template NodeMap<uint64_t> nifty::graph::opt::mincut::MincutObjective::NodeLabelsType

Public Functions

MincutObjective(const GraphType &g)
WeightsMap &weights()
const GraphType &graph() const
const WeightsMap &weights() const

Private Members

const GraphType &graph_
WeightsMap weights_
template <class CHILD_OBJECTIVE, class GRAPH, class WEIGHT_TYPE>
class MincutObjectiveBase

Public Types

typedef CHILD_OBJECTIVE ChildObjective
typedef MincutObjectiveBase<ChildObjective, GRAPH, WEIGHT_TYPE> Self

Public Functions

template <class NODE_LABELS>
WEIGHT_TYPE evalNodeLabels(const NODE_LABELS &nodeLabels) const

Private Functions

ChildObjective &_child()
const ChildObjective &_child() const
template <class OBJECTIVE>
struct MincutObjectiveName
template <class GRAPH>
template<>
struct MincutObjectiveName<PyDefaultMincutObjective<GRAPH>>

Public Static Functions

static std::string name()
template <class OBJECTIVE>
class MincutQpbo

Inherits from nifty::graph::opt::mincut::MincutBase< OBJECTIVE >

Public Types

typedef OBJECTIVE ObjectiveType
typedef MincutBase<OBJECTIVE> BaseType
typedef BaseType::VisitorBaseType VisitorBaseType
typedef BaseType::VisitorProxyType VisitorProxyType
typedef BaseType::NodeLabelsType NodeLabelsType
typedef ObjectiveType::GraphType GraphType

Public Functions

virtual ~MincutQpbo()
MincutQpbo(const ObjectiveType &objective, const SettingsType &settings = SettingsType ())
void optimize(NodeLabelsType &nodeLabels, VisitorBaseType *visitor)
const MincutQpbo<OBJECTIVE>::ObjectiveType &objective() const
virtual const NodeLabelsType &currentBestNodeLabels()
virtual double currentBestEnergy()
virtual std::string name() const
virtual void weightsChanged()

Private Types

typedef float QpboValueType
typedef detail_graph::NodeIndicesToContiguousNodeIndices<GraphType> DenseIds

Private Functions

void initializeQpbo()
void repairSolution(NodeLabelsType &nodeLabels)
size_t addCycleInequalities()
void addThreeCyclesConstraintsExplicitly()

Private Members

const ObjectiveType &objective_
const GraphType &graph_
DenseIds denseNodeIds_
SettingsType settings_
NodeLabelsType *currentBest_
double currentBestEnergy_
QPBO<QpboValueType> qpbo_
template <class G, class T>
class MinEdgeMap

Public Types

typedef G GraphType
typedef GraphType:: template EdgeMap<T> nifty::graph::agglo::merge_rules::MinEdgeMap::MinEdgeMapType
typedef GraphType:: template EdgeMap<nifty::float16_t> nifty::graph::agglo::merge_rules::MinEdgeMap::SizeEdgeMapType
typedef MinSettings SettingsType

Public Functions

auto name() const
template <class VALUES, class WEIGHTS>
MinEdgeMap(const GraphType &g, const VALUES &values, const WEIGHTS &weights, const SettingsType &settings = SettingsType ())
void merge(const uint64_t aliveEdge, const uint64_t deadEdge)
void setValueFrom(const uint64_t targetEdge, const uint64_t sourceEdge)
void setFrom(const uint64_t targetEdge, const uint64_t sourceEdge)
void set(const uint64_t targetEdge, const T &value, const T &weight)
T operator[](const uint64_t edge) const

Public Static Functions

static auto staticName()

Private Members

MinEdgeMapType values_
template <class GRAPH>
class MinimumNodeSizeClusterPolicy

Public Types

typedef GRAPH GraphType
typedef FloatEdgeMap EdgeIndicatorsType
typedef FloatEdgeMap EdgeSizesType
typedef FloatNodeMap NodeSizesType
typedef EdgeContractionGraph<GraphType, SelfType> EdgeContractionGraphType

Public Functions

template <class EDGE_INDICATORS, class EDGE_SIZES, class NODE_SIZES>
MinimumNodeSizeClusterPolicy(const GraphType &graph, const EDGE_INDICATORS &edgeIndicators, const EDGE_SIZES &edgeSizes, const NODE_SIZES &nodeSizes, const SettingsType &settings = SettingsType ())
std::pair<uint64_t, double> edgeToContractNext() const
bool isDone() const
MinimumNodeSizeClusterPolicy<GRAPH>::EdgeContractionGraphType &edgeContractionGraph()
void contractEdge(const uint64_t edgeToContract)
void mergeNodes(const uint64_t aliveNode, const uint64_t deadNode)
void mergeEdges(const uint64_t aliveEdge, const uint64_t deadEdge)
void contractEdgeDone(const uint64_t edgeToContract)
const EdgeIndicatorsType &edgeIndicators() const
const EdgeSizesType &edgeSizes() const
const NodeSizesType &nodeSizes() const

Private Types

typedef MinimumNodeSizeClusterPolicy<GRAPH> SelfType
typedef GRAPH:: template EdgeMap<double> nifty::graph::agglo::MinimumNodeSizeClusterPolicy::FloatEdgeMap
typedef GRAPH:: template NodeMap<double> nifty::graph::agglo::MinimumNodeSizeClusterPolicy::FloatNodeMap
typedef nifty::tools::ChangeablePriorityQueue<double, std::less<double>> QueueType

Private Functions

void initializeWeights()
double computeWeight(const uint64_t edge) const

Private Members

const GraphType &graph_
EdgeIndicatorsType edgeIndicators_
EdgeSizesType edgeSizes_
NodeSizesType nodeSizes_
SettingsType settings_
EdgeContractionGraphType edgeContractionGraph_
QueueType pq_

Friends

friend nifty::graph::agglo::MinimumNodeSizeClusterPolicy::EdgeContractionGraph< GraphType, SelfType, false >
struct MinSettings

Public Functions

auto name() const
template <class OBJECTIVE>
class MinstcutBase

Inherits from nifty::graph::opt::common::SolverBase< OBJECTIVE, MinstcutBase< OBJECTIVE > >

Subclassed by nifty::graph::opt::minstcut::PyMinstcutBase< OBJECTIVE >

template <class GRAPH, class WEIGHT_TYPE>
class MinstcutObjective

Inherits from nifty::graph::opt::minstcut::MinstcutObjectiveBase< MinstcutObjective< GRAPH, WEIGHT_TYPE >, GRAPH, WEIGHT_TYPE >

Public Types

typedef GRAPH GraphType
typedef WEIGHT_TYPE WeightType
typedef graph_maps::EdgeMap<GraphType, WeightType> WeightsMap
typedef graph_maps::NodeMap<GraphType, std::pair<float, float>> UnaryMap
typedef GraphType:: template NodeMap<uint64_t> nifty::graph::opt::minstcut::MinstcutObjective::NodeLabelsType

Public Functions

MinstcutObjective(const GraphType &g)
WeightsMap &weights()
const GraphType &graph() const
const WeightsMap &weights() const
const UnaryMap &unaries() const
UnaryMap &unaries()

Private Members

const GraphType &graph_
WeightsMap weights_
UnaryMap unaries_
template <class CHILD_OBJECTIVE, class GRAPH, class WEIGHT_TYPE>
class MinstcutObjectiveBase

Public Types

typedef CHILD_OBJECTIVE ChildObjective
typedef MinstcutObjectiveBase<ChildObjective, GRAPH, WEIGHT_TYPE> Self

Public Functions

template <class NODE_LABELS>
WEIGHT_TYPE evalNodeLabels(const NODE_LABELS &nodeLabels) const

Private Functions

ChildObjective &_child()
const ChildObjective &_child() const
template <class OBJECTIVE>
struct MinstcutObjectiveName
template <class GRAPH>
template<>
struct MinstcutObjectiveName<PyDefaultMinstcutObjective<GRAPH>>

Public Static Functions

static std::string name()
template <class ARRAY>
struct MultibandArrayViewNodeMap

Public Types

typedef ARRAY::value_type value_type
typedef ARRAY::reference reference
typedef ARRAY::const_reference const_reference

Public Functions

MultibandArrayViewNodeMap(const ARRAY &array)
Proxy operator[](const uint64_t nodeIndex)
ConstProxy operator[](const uint64_t nodeIndex) const
const size_t numberOfChannels() const

Private Members

const ARRAY &array_
size_t nChannels_
template <class G, class T>
struct MultibandNodeMap

Public Functions

MultibandNodeMap(const G &g, const size_t nChannels)
MultibandNodeMap(const G &g, const size_t nChannels, const T &val)
Proxy operator[](const uint64_t nodeIndex)
ConstProxy operator[](const uint64_t nodeIndex) const
const size_t numberOfChannels() const

Private Members

std::vector<T> data_
size_t nChannels_
template <class OBJECTIVE>
class MulticutAndres

Inherits from nifty::graph::opt::multicut::MulticutBase< OBJECTIVE >

Subclassed by nifty::graph::opt::multicut::MulticutAndresGreedyAdditive< OBJECTIVE >, nifty::graph::opt::multicut::MulticutAndresKernighanLin< OBJECTIVE >

Public Types

typedef OBJECTIVE ObjectiveType
typedef ObjectiveType::GraphType GraphType
typedef MulticutBase<OBJECTIVE> BaseType
typedef BaseType::VisitorBaseType VisitorBaseType
typedef BaseType::VisitorProxyType VisitorProxyType
typedef BaseType::NodeLabelsType NodeLabelsType
typedef andres::graph::Graph AGraphType

Public Functions

MulticutAndres(const ObjectiveType &objective)
virtual void optimize(NodeLabelsType &nodelabels, VisitorBaseType *visitor)
virtual const ObjectiveType &objective() const
virtual const NodeLabelsType &currentBestNodeLabels()
virtual std::string name() const

Protected Functions

void nodeLabelsToEdgeLabels(std::vector<char> &edgeLabels)
void edgeLabelsToNodeLabels(const std::vector<char> &edgeLabels)

Protected Attributes

NodeLabelsType *currentBest_
AGraphType graph_

Private Functions

void initGraph()

Private Members

const ObjectiveType &objective_
ufd::Ufd<uint64_t> ufd_
template <class OBJECTIVE>
class MulticutAndresGreedyAdditive

Inherits from nifty::graph::opt::multicut::MulticutAndres< OBJECTIVE >

Public Types

typedef OBJECTIVE ObjectiveType
typedef MulticutAndres<OBJECTIVE> Base
typedef Base::NodeLabelsType NodeLabelsType
typedef Base::VisitorBaseType VisitorBaseType

Public Functions

MulticutAndresGreedyAdditive(const ObjectiveType &objective, const SettingsType &settings = SettingsType ())
void optimize(NodeLabelsType &nodeLabels, VisitorBaseType *visitor)
virtual const ObjectiveType &objective() const
virtual const NodeLabelsType &currentBestNodeLabels()
virtual std::string name() const
template <class OBJECTIVE>
class MulticutAndresKernighanLin

Inherits from nifty::graph::opt::multicut::MulticutAndres< OBJECTIVE >

Public Types

typedef OBJECTIVE ObjectiveType
typedef MulticutAndres<OBJECTIVE> Base
typedef Base::NodeLabelsType NodeLabelsType
typedef Base::VisitorBaseType VisitorBaseType
typedef andres::graph::multicut::KernighanLinSettings KlSettings

Public Functions

MulticutAndresKernighanLin(const ObjectiveType &objective, const SettingsType &settings = SettingsType ())
void optimize(NodeLabelsType &nodeLabels, VisitorBaseType *visitor)
virtual const ObjectiveType &objective() const
virtual const NodeLabelsType &currentBestNodeLabels()
virtual std::string name() const

Private Members

SettingsType settings_
KlSettings klSettings_
template <class OBJECTIVE>
class MulticutBase

Inherits from nifty::graph::opt::common::SolverBase< OBJECTIVE, MulticutBase< OBJECTIVE > >, nifty::graph::opt::common::SolverBase< OBJECTIVE, MulticutBase< OBJECTIVE > >

Subclassed by nifty::graph::opt::multicut::BlockMulticut< OBJECTIVE >, nifty::graph::opt::multicut::Cgc< OBJECTIVE >, nifty::graph::opt::multicut::ChainedSolvers< OBJECTIVE >, nifty::graph::opt::multicut::KernighanLin< OBJECTIVE >, nifty::graph::opt::multicut::MulticutAndres< OBJECTIVE >, nifty::graph::opt::multicut::MulticutDecomposer< OBJECTIVE >, nifty::graph::opt::multicut::MulticutGreedyAdditive< OBJECTIVE >, nifty::graph::opt::multicut::MulticutIlp< OBJECTIVE, ILP_SOLVER >, nifty::graph::opt::multicut::MulticutMp< OBJECTIVE >, nifty::graph::opt::multicut::PyMulticutBase< OBJECTIVE >, nifty::graph::opt::multicut::PyMulticutBase< OBJECTIVE >

template <class OBJECTIVE>
class MulticutDecomposer

Inherits from nifty::graph::opt::multicut::MulticutBase< OBJECTIVE >

Public Types

typedef OBJECTIVE ObjectiveType
typedef ObjectiveType::WeightType WeightType
typedef MulticutBase<OBJECTIVE> BaseType
typedef BaseType::VisitorBaseType VisitorBaseType
typedef BaseType::VisitorProxyType VisitorProxyType
typedef BaseType::NodeLabelsType NodeLabelsType
typedef ObjectiveType::GraphType GraphType
typedef ObjectiveType::WeightsMap WeightsMap
typedef nifty::graph::opt::common::SolverFactoryBase<BaseType> FactoryBase
typedef UndirectedGraph SubmodelGraph
typedef MulticutObjective<SubmodelGraph, WeightType> SubmodelObjective
typedef MulticutBase<SubmodelObjective> SubmodelMulticutBaseType
typedef nifty::graph::opt::common::SolverFactoryBase<SubmodelMulticutBaseType> SubmodelFactoryBase
typedef SubmodelMulticutBaseType::NodeLabelsType SubmodelNodeLabels

Public Functions

virtual ~MulticutDecomposer()
MulticutDecomposer(const ObjectiveType &objective, const SettingsType &settings = SettingsType ())
void optimize(NodeLabelsType &nodeLabels, VisitorBaseType *visitor)
const MulticutDecomposer<OBJECTIVE>::ObjectiveType &objective() const
virtual const NodeLabelsType &currentBestNodeLabels()
virtual std::string name() const
virtual void weightsChanged()

Private Types

typedef ComponentsUfd<GraphType> Components

Private Members

const ObjectiveType &objective_
const GraphType &graph_
const WeightsMap &weights_
Components components_
NodeLabelsType *currentBest_
SettingsType settings_
template <class OBJECTIVE>
class MulticutGreedyAdditive

Inherits from nifty::graph::opt::multicut::MulticutBase< OBJECTIVE >

Public Types

typedef OBJECTIVE ObjectiveType
typedef ObjectiveType::GraphType GraphType
typedef detail_multicut_greedy_additive::MulticutGreedyAdditiveCallback<ObjectiveType> Callback
typedef MulticutBase<OBJECTIVE> BaseType
typedef BaseType::VisitorBaseType VisitorBaseType
typedef BaseType::NodeLabelsType NodeLabelsType
typedef Callback::SettingsType SettingsType

Public Functions

virtual ~MulticutGreedyAdditive()
MulticutGreedyAdditive(const ObjectiveType &objective, const SettingsType &settings = SettingsType ())
void optimize(NodeLabelsType &nodeLabels, VisitorBaseType *visitor)
const MulticutGreedyAdditive<OBJECTIVE>::ObjectiveType &objective() const
void reset()
void changeSettings(const SettingsType &settings)
virtual void weightsChanged()
virtual const NodeLabelsType &currentBestNodeLabels()
virtual std::string name() const

Private Members

const ObjectiveType &objective_
const GraphType &graph_
NodeLabelsType *currentBest_
Callback callback_
EdgeContractionGraph<GraphType, Callback> edgeContractionGraph_
template <class OBJECTIVE, class ILP_SOLVER>
class MulticutIlp

Inherits from nifty::graph::opt::multicut::MulticutBase< OBJECTIVE >

Public Types

typedef OBJECTIVE ObjectiveType
typedef ObjectiveType::GraphType GraphType
typedef MulticutBase<OBJECTIVE> BaseType
typedef BaseType::VisitorBaseType VisitorBaseType
typedef BaseType::NodeLabelsType NodeLabelsType
typedef ILP_SOLVER IlpSovler
typedef IlpSovler::SettingsType IlpSettingsType

Public Functions

virtual ~MulticutIlp()
MulticutIlp(const ObjectiveType &objective, const SettingsType &settings = SettingsType ())
void optimize(NodeLabelsType &nodeLabels, VisitorBaseType *visitor)
const MulticutIlp<OBJECTIVE, ILP_SOLVER>::ObjectiveType &objective() const
virtual const NodeLabelsType &currentBestNodeLabels()
virtual std::string name() const
virtual void weightsChanged()

Private Types

typedef BaseType::VisitorProxyType VisitorProxyType
typedef ComponentsUfd<GraphType> Components
typedef detail_graph::EdgeIndicesToContiguousEdgeIndices<GraphType> DenseIds

Private Functions

void addThreeCyclesConstraintsExplicitly(const IlpSovler &ilpSolver)
void initializeIlp()
void repairSolution(NodeLabelsType &nodeLabels)
size_t addCycleInequalities()
void addThreeCyclesConstraintsExplicitly()

Private Members

const ObjectiveType &objective_
const GraphType &graph_
IlpSovler *ilpSolver_
Components components_
DenseIds denseIds_
BidirectionalBreadthFirstSearch<GraphType> bibfs_
SettingsType settings_
std::vector<size_t> variables_
std::vector<double> coefficients_
NodeLabelsType *currentBest_
size_t addedConstraints_
size_t numberOfOptRuns_
template <class OBJECTIVE>
class MulticutMp

Inherits from nifty::graph::opt::multicut::MulticutBase< OBJECTIVE >

Public Types

typedef OBJECTIVE ObjectiveType
typedef MulticutBase<OBJECTIVE> BaseType
typedef BaseType::VisitorBaseType VisitorBaseType
typedef BaseType::VisitorProxyType VisitorProxyType
typedef BaseType::NodeLabelsType NodeLabelsType
typedef ObjectiveType::GraphType GraphType
typedef nifty::graph::opt::common::SolverFactoryBase<BaseType> McFactoryBase
typedef NiftyRounder Rounder
typedef LP_MP::FMC_ODD_WHEEL_MULTICUT<LP_MP::MessageSendingType::SRMP, Rounder> FMC
typedef LP_MP::Solver<FMC, LP_MP::LP, LP_MP::StandardTighteningVisitor, Rounder> SolverBase
typedef LP_MP::ProblemConstructorRoundingSolver<SolverBase> SolverType

Public Functions

virtual ~MulticutMp()
MulticutMp(const ObjectiveType &objective, const SettingsType &settings = SettingsType ())
void optimize(NodeLabelsType &nodeLabels, VisitorBaseType *visitor)
virtual const ObjectiveType &objective() const
virtual const NodeLabelsType &currentBestNodeLabels()
virtual std::string name() const

Private Functions

void initializeMp()
void nodeLabeling()
std::vector<std::string> toOptionsVector() const

Private Members

const ObjectiveType &objective_
const GraphType &graph_
SettingsType settings_
NodeLabelsType *currentBest_
size_t numberOfOptRuns_
SolverType *mpSolver_
ufd::Ufd<uint64_t> ufd_
template <class GRAPH, class WEIGHT_TYPE>
class MulticutObjective

Inherits from nifty::graph::opt::multicut::MulticutObjectiveBase< MulticutObjective< GRAPH, WEIGHT_TYPE >, GRAPH, WEIGHT_TYPE >

Public Types

typedef GRAPH GraphType
typedef GraphType:: template NodeMap<uint64_t> nifty::graph::opt::multicut::MulticutObjective::NodeLabelsType
typedef WEIGHT_TYPE WeightType
typedef graph_maps::EdgeMap<GraphType, WeightType> WeightsMap

Public Functions

MulticutObjective(const GraphType &g)
WeightsMap &weights()
const GraphType &graph() const
const WeightsMap &weights() const

Private Members

const GraphType &graph_
WeightsMap weights_
template <class CHILD_OBJECTIVE, class GRAPH, class WEIGHT_TYPE>
class MulticutObjectiveBase

Public Types

typedef CHILD_OBJECTIVE ChildObjective
typedef MulticutObjectiveBase<ChildObjective, GRAPH, WEIGHT_TYPE> Self

Public Functions

template <class NODE_LABELS>
WEIGHT_TYPE evalNodeLabels(const NODE_LABELS &nodeLabels) const

Private Functions

ChildObjective &_child()
const ChildObjective &_child() const
template <class OBJECTIVE>
struct MulticutObjectiveName
template <class GRAPH>
template<>
struct MulticutObjectiveName<PyDefaultMulticutObjective<GRAPH>>

Public Static Functions

static std::string name()
template <class GRAPH, bool ENABLE_UCM>
class NewPolicy

Public Types

typedef GRAPH GraphType
typedef FloatEdgeMap EdgePrioType
typedef FloatEdgeMap EdgeSizesType
typedef FloatNodeMap NodeSizesType
typedef EdgeContractionGraph<GraphType, SelfType> EdgeContractionGraphType

Public Functions

template <class MERGE_PRIOS, class NOT_MERGE_PRIOS, class IS_LOCAL_EDGE, class EDGE_SIZES>
NewPolicy(const GraphType &graph, const MERGE_PRIOS &mergePrios, const NOT_MERGE_PRIOS &notMergePrios, const IS_LOCAL_EDGE &isLocalEdge, const EDGE_SIZES &edgeSizes, const SettingsType &settings = SettingsType ())
std::pair<uint64_t, double> edgeToContractNext() const
bool isDone()
NewPolicy<GRAPH, ENABLE_UCM>::EdgeContractionGraphType &edgeContractionGraph()
void contractEdge(const uint64_t edgeToContract)
void mergeNodes(const uint64_t aliveNode, const uint64_t deadNode)
void mergeEdges(const uint64_t aliveEdge, const uint64_t deadEdge)
void contractEdgeDone(const uint64_t edgeToContract)
bool isMergeAllowed(const uint64_t edge)
const EdgePrioType &mergePrios() const
const EdgePrioType &notMergePrios() const
const EdgeSizesType &edgeSizes() const

Private Types

typedef NewPolicy<GRAPH, ENABLE_UCM> SelfType
typedef GRAPH:: template EdgeMap<uint8_t> nifty::graph::agglo::NewPolicy::UInt8EdgeMap
typedef GRAPH:: template EdgeMap<double> nifty::graph::agglo::NewPolicy::FloatEdgeMap
typedef GRAPH:: template NodeMap<double> nifty::graph::agglo::NewPolicy::FloatNodeMap
typedef boost::container::flat_set<uint64_t> SetType
typedef nifty::tools::ChangeablePriorityQueue<double, std::greater<double>> QueueType

Private Functions

double pqMergePrio(const uint64_t edge) const
const double getMergePrio(const uint64_t edge) const
const double notMergePrio(const uint64_t edge) const

Private Members

const GraphType &graph_
EdgePrioType mergePrios_
EdgePrioType notMergePrios_
UInt8EdgeMap isLocalEdge_
UInt8EdgeMap isPureLocal_
UInt8EdgeMap isPureLifted_
EdgeSizesType edgeSizes_
SettingsType settings_
EdgeContractionGraphType edgeContractionGraph_
QueueType pq_
uint64_t edgeToContractNext_
double edgeToContractNextMergePrio_

Friends

friend nifty::graph::agglo::NewPolicy::EdgeContractionGraph< GraphType, SelfType, ENABLE_UCM >
struct NiftyRounder

Public Types

template<>
typedef GraphType GraphType

Public Functions

template<>
NiftyRounder(std::shared_ptr<McFactoryBase> factory)
template<>
std::vector<char> operator()(GraphType &&g, std::vector<double> &&edgeValues)

Public Static Functions

template<>
static std::string name()

Private Members

template<>
std::shared_ptr<McFactoryBase> factory_
class NoBeginEndVisitor

Inherits from VisitorBaseType

Public Functions

template<>
NoBeginEndVisitor(VisitorBaseType *visitor)
template<>
virtual void begin(BaseType *solver)
template<>
virtual bool visit(BaseType *solver)
template<>
virtual void end(BaseType *solver)
template<>
virtual void clearLogNames()
template<>
virtual void addLogNames(std::initializer_list<std::string> logNames)
template<>
virtual void setLogValue(const size_t logIndex, double logValue)
template<>
virtual void printLog(const nifty::logging::LogLevel logLevel, const std::string &logString)

Private Members

template<>
VisitorBaseType *visitor_
class NoBeginEndVisitor

Inherits from VisitorBaseType

Public Functions

template<>
NoBeginEndVisitor(VisitorBaseType *visitor)
template<>
virtual void begin(BaseType *solver)
template<>
virtual bool visit(BaseType *solver)
template<>
virtual void end(BaseType *solver)
template<>
virtual void clearLogNames()
template<>
virtual void addLogNames(std::initializer_list<std::string> logNames)
template<>
virtual void setLogValue(const size_t logIndex, double logValue)
template<>
virtual void printLog(const nifty::logging::LogLevel logLevel, const std::string &logString)

Private Members

template<>
VisitorBaseType *visitor_
template <class GRAPH, bool ENABLE_UCM>
class NodeAndEdgeWeightedClusterPolicy

Public Types

typedef GRAPH GraphType
typedef GRAPH:: template EdgeMap<double> nifty::graph::agglo::NodeAndEdgeWeightedClusterPolicy::FloatEdgeMap
typedef GRAPH:: template NodeMap<double> nifty::graph::agglo::NodeAndEdgeWeightedClusterPolicy::FloatNodeMap
typedef nifty::graph::graph_maps::MultibandNodeMap<GraphType, double> NodeFeatureMap
typedef FloatEdgeMap EdgeIndicatorsType
typedef FloatEdgeMap EdgeSizesType
typedef FloatNodeMap NodeSizesType
typedef EdgeContractionGraph<GraphType, SelfType> EdgeContractionGraphType

Public Functions

template <class EDGE_INDICATORS, class EDGE_SIZES, class NODE_FEATURES, class NODE_SIZES>
NodeAndEdgeWeightedClusterPolicy(const GraphType &graph, const EDGE_INDICATORS &edgeIndicators, const EDGE_SIZES &edgeSizes, const NODE_FEATURES &nodeFeatures, const NODE_SIZES &nodeSizes, const SettingsType &settings = SettingsType ())
std::pair<uint64_t, double> edgeToContractNext() const
bool isDone() const
NodeAndEdgeWeightedClusterPolicy<GRAPH, ENABLE_UCM>::EdgeContractionGraphType &edgeContractionGraph()
void contractEdge(const uint64_t edgeToContract)
void mergeNodes(const uint64_t aliveNode, const uint64_t deadNode)
void mergeEdges(const uint64_t aliveEdge, const uint64_t deadEdge)
void contractEdgeDone(const uint64_t edgeToContract)
const EdgeIndicatorsType &edgeIndicators() const
const EdgeSizesType &edgeSizes() const
const NodeSizesType &nodeSizes() const

Private Types

typedef NodeAndEdgeWeightedClusterPolicy<GRAPH, ENABLE_UCM> SelfType
typedef nifty::tools::ChangeablePriorityQueue<double, std::less<double>> QueueType

Private Functions

void initializeWeights()
double computeWeight(const uint64_t edge) const
double weightFromNodes(const uint64_t u, const uint64_t v) const

Private Members

const GraphType &graph_
EdgeIndicatorsType edgeIndicators_
EdgeSizesType edgeSizes_
NodeFeatureMap nodeFeatures_
NodeSizesType nodeSizes_
SettingsType settings_
const uint64_t nChannels_
EdgeContractionGraphType edgeContractionGraph_
QueueType pq_

Friends

friend nifty::graph::agglo::NodeAndEdgeWeightedClusterPolicy::EdgeContractionGraph< GraphType, SelfType, ENABLE_UCM >
template <class GRAPH>
class NodeIndicesToContiguousNodeIndices

Inherits from nifty::graph::detail_graph::NodeIndicesToContiguousNodeIndicesImpl< GRAPH, GRAPH::NodeIdTag >

template <class GRAPH, class NODE_ID_TAG>
class NodeIndicesToContiguousNodeIndicesImpl

Public Types

typedef GRAPH GraphType

Public Functions

NodeIndicesToContiguousNodeIndicesImpl(const GraphType &graph)
int64_t operator[](const int64_t node) const

Private Types

typedef GraphType:: template NodeMap<uint64_t> nifty::graph::detail_graph::NodeIndicesToContiguousNodeIndicesImpl::ContiguousIdStorage

Private Members

ContiguousIdStorage ids_
template <class GRAPH>
template<>
class NodeIndicesToContiguousNodeIndicesImpl<GRAPH, nifty::graph::ContiguousTag>

Public Types

typedef GRAPH GraphType

Public Functions

NodeIndicesToContiguousNodeIndicesImpl(const GraphType &graph)
int64_t operator[](const int64_t node) const
class NodeIter

Inherits from boost::counting_iterator< int64_t >

template <class _CHILD_GRAPH>
struct NodeIterRange

Inherits from nifty::tools::ConstIteratorRange< _CHILD_GRAPH::NodeIter >

template <class _CHILD_GRAPH>
struct NodeIterRange

Inherits from nifty::tools::ConstIteratorRange< _CHILD_GRAPH::NodeIter >

template <class GRAPH, class NODE_MAP>
class NodeLabelsToEdgeLabelsUnaryFunction

Public Types

typedef const uint8_t &Reference
typedef uint8_t Value
typedef const uint8_t &reference
typedef uint8_t value

Public Functions

NodeLabelsToEdgeLabelsUnaryFunction(const GRAPH &graph, const NODE_MAP &nodeLabels)
NodeLabelsToEdgeLabelsUnaryFunction(const NodeLabelsToEdgeLabelsUnaryFunction &other)
const uint8_t &operator()(const int64_t edgeId) const

Private Members

uint8_t valBuffer_
const GRAPH &graph_
const NODE_MAP &nodeLabels_
template <class T>
struct NodeMap

Inherits from nifty::graph::graph_maps::NodeMap< ChildGraph, T >

template <class G, class T>
struct NodeMap

Inherits from std::vector< T >

Public Functions

NodeMap(const G &g, const T &val)
NodeMap(const G &g)
NodeMap()
void insertedNodes(const uint64_t nodeId, const T &insertValue = T())
template <class T>
struct NodeMap

Inherits from nifty::graph::graph_maps::NodeMap< ChildGraph, T >

struct NodeTag
template <>
template<>
class numeric_limits<half_float::half>

Inherits from numeric_limits< float >

Public Static Functions

static HALF_CONSTEXPR half_float::half std::numeric_limits::min()
static HALF_CONSTEXPR half_float::half std::numeric_limits::lowest()
static HALF_CONSTEXPR half_float::half std::numeric_limits::max()
static HALF_CONSTEXPR half_float::half std::numeric_limits::epsilon()
static HALF_CONSTEXPR half_float::half std::numeric_limits::round_error()
static HALF_CONSTEXPR half_float::half std::numeric_limits::infinity()
static HALF_CONSTEXPR half_float::half std::numeric_limits::quiet_NaN()
static HALF_CONSTEXPR half_float::half std::numeric_limits::signaling_NaN()
static HALF_CONSTEXPR half_float::half std::numeric_limits::denorm_min()

Public Static Attributes

HALF_CONSTEXPR_CONST bool std::numeric_limits::is_signed = true
HALF_CONSTEXPR_CONST bool std::numeric_limits::is_exact = false
HALF_CONSTEXPR_CONST bool std::numeric_limits::is_modulo = false
HALF_CONSTEXPR_CONST bool std::numeric_limits::is_iec559 = true
HALF_CONSTEXPR_CONST bool std::numeric_limits::has_infinity = true
HALF_CONSTEXPR_CONST bool std::numeric_limits::has_quiet_NaN = true
HALF_CONSTEXPR_CONST float_denorm_style std::numeric_limits::has_denorm = denorm_present
HALF_CONSTEXPR_CONST float_round_style std::numeric_limits::round_style = (std::numeric_limits<float>::round_style== half_float::half::round_style) ? half_float::half::round_style : round_indeterminate
HALF_CONSTEXPR_CONST int std::numeric_limits::digits = 11
HALF_CONSTEXPR_CONST int std::numeric_limits::digits10 = 3
HALF_CONSTEXPR_CONST int std::numeric_limits::max_digits10 = 5
HALF_CONSTEXPR_CONST int std::numeric_limits::radix = 2
HALF_CONSTEXPR_CONST int std::numeric_limits::min_exponent = -13
HALF_CONSTEXPR_CONST int std::numeric_limits::min_exponent10 = -4
HALF_CONSTEXPR_CONST int std::numeric_limits::max_exponent = 16
HALF_CONSTEXPR_CONST int std::numeric_limits::max_exponent10 = 4
template <class T>
class Numerics

Inherits from nifty::math::NumericsImplDispatch< T, std::numeric_limits< T >::is_specialized >

template <class T, bool IS_NUMBER>
class NumericsImplDispatch
template <class T>
template<>
class NumericsImplDispatch<T, true>

Public Types

typedef vigra::NumericTraits<T>::RealPromote RealPromoteType

Public Static Functions

static constexpr T zero()
static constexpr T one()
static void zero(T &value)
static T one(T &value)
static RealPromoteType real(const T &value)
template <class T>
struct NumericTraits

Inherits from vigra::NumericTraits< T >

Public Types

typedef vigra::NumericTraits<T> BaseType
typedef BaseType::Promote PromoteType
typedef BaseType::RealPromote RealPromoteType
template <class LABEL_TYPE = uint64_t, class COUNT_TYPE = uint64_t>
class Overlap

Public Types

typedef LABEL_TYPE LabelType
typedef COUNT_TYPE CountType
typedef std::unordered_map<LabelType, CountType> MapType

Public Functions

template <class SET_A_ITER, class SET_B_ITER>
Overlap(const uint64_t maxLabelSetA, SET_A_ITER aBegin, SET_A_ITER aEnd, SET_B_ITER bBegin)
template <class LABEL_A, class LABEL_B>
Overlap(const uint64_t maxLabelSetA, const marray::View<LABEL_A> arrayA, const marray::View<LABEL_B> arrayB)
double differentOverlap(const LabelType u, const LabelType v) const
double bleeding(const LabelType u) const
const std::vector<CountType> &counts() const
const std::vector<MapType> &overlaps() const
LabelType maxOverlappingLabel(const LabelType u) const
LabelType maxOverlappingLabelDownvoteZeros(const LabelType u) const
std::pair<LabelType, bool> maxOverlappingNonZeroLabel(const LabelType u) const
bool isOverlappingWithZero(const LabelType u) const

Private Functions

template <class SET_A_ITER, class SET_B_ITER>
void fill(SET_A_ITER aBegin, SET_A_ITER aEnd, SET_B_ITER bBegin)
template <size_t DIM, class LABEL_A, class LABEL_B>
void fill(const marray::View<LABEL_A> arrayA, const marray::View<LABEL_B> arrayB)

Private Members

std::vector<CountType> counts_
std::vector<MapType> overlaps_
class ParallelOptions

Public Types

enum [anonymous]

Values:

Auto = -1
Nice = -2
NoThreads = 0

Public Functions

ParallelOptions(int nT = Auto)
int getNumThreads() const
int getActualNumThreads() const
ParallelOptions &numThreads(const int n)

Private Members

int numThreads_

Private Static Functions

static size_t actualNumThreads(const int userNThreads)
struct PerSliceData

Public Functions

template<>
PerSliceData(const LabelType numberOfLabels)

Public Members

template<>
uint64_t numberOfInSliceEdges
template<>
uint64_t numberOfToNextSliceEdges
template<>
uint64_t inSliceEdgeOffset
template<>
uint64_t toNextSliceEdgeOffset
template<>
LabelType minInSliceNode
template<>
LabelType maxInSliceNode
template <class OBJECTIVE>
class PerturbAndMap

Public Types

enum NoiseType

Values:

UNIFORM_NOISE
NORMAL_NOISE
MAKE_LESS_CERTAIN
typedef OBJECTIVE ObjectiveType
typedef ObjectiveType::GraphType GraphType
typedef MulticutObjective<GraphType, double> InternalObjective
typedef MulticutBase<ObjectiveType> MulticutBaseType
typedef MulticutBase<InternalObjective> IternalMulticutBaseType
typedef nifty::graph::opt::common::SolverFactoryBase<IternalMulticutBaseType> InternalMcFactoryBase
typedef GraphType:: template NodeMap<uint64_t> nifty::graph::opt::multicut::PerturbAndMap::NodeLabels
typedef GraphType:: template EdgeMap<double> nifty::graph::opt::multicut::PerturbAndMap::EdgeState
typedef std::shared_ptr<InternalMcFactoryBase> FactorySmartPtr

Public Functions

PerturbAndMap(const ObjectiveType &objective, const SettingsType settings = SettingsType ())
~PerturbAndMap()
const PerturbAndMap<OBJECTIVE>::ObjectiveType &objective() const
const PerturbAndMap<OBJECTIVE>::GraphType &graph() const
void optimize(EdgeState &edgeState)
void optimize(const NodeLabels &startingPoint, EdgeState &edgeState)

Private Functions

template <class WEIGHTS>
void perturbWeights(const size_t threadId, WEIGHTS &perturbedWeights)

Private Members

const ObjectiveType &objective_
const GraphType &graph_
SettingsType settings_
std::vector<ThreadData *> threadDataVec_
template <std::size_t DIM>
class PixelWiseLmcConnetedComponentsFusion
template <>
template<>
class PixelWiseLmcConnetedComponentsFusion<2>

Public Types

typedef nifty::graph::UndirectedGraph CCGraphType
typedef LiftedMulticutObjective<CCGraphType, double> CCObjectiveType
typedef LiftedMulticutBase<CCObjectiveType> CCBaseType
typedef CCBaseType::VisitorBaseType CVisitorBaseType
typedef CCBaseType::NodeLabelsType CCNodeLabels
typedef nifty::graph::opt::common::SolverFactoryBase<CCBaseType> CCLmcFactoryBase
typedef nifty::graph::UndirectedGraph CCGraphType
typedef LiftedMulticutObjective<CCGraphType, double> CCObjectiveType
typedef LiftedMulticutBase<CCObjectiveType> CCBaseType
typedef CCBaseType::VisitorBaseType CVisitorBaseType
typedef CCBaseType::NodeLabelsType CCNodeLabels
typedef nifty::graph::opt::common::SolverFactoryBase<CCBaseType> CCLmcFactoryBase

Public Functions

PixelWiseLmcConnetedComponentsFusion(const PixelWiseLmcObjective<DIM> &objective, std::shared_ptr<CCLmcFactoryBase> solver_fatory)
template <class D_LABELS_A, class D_LABELS_B>
auto fuse(const xt::xexpression<D_LABELS_A> &e_labels_a, const xt::xexpression<D_LABELS_B> &e_labels_b)
template <class D_LABELS>
auto fuse(const xt::xexpression<D_LABELS> &e_labels)
PixelWiseLmcConnetedComponentsFusion(const PixelWiseLmcObjective<DIM> &objective, std::shared_ptr<CCLmcFactoryBase> solver_fatory)
template <class D_LABELS_A, class D_LABELS_B>
auto fuse(const xt::xexpression<D_LABELS_A> &e_labels_a, const xt::xexpression<D_LABELS_B> &e_labels_b)
template <class D_LABELS>
auto fuse(const xt::xexpression<D_LABELS> &e_labels)

Public Static Attributes

static const std::size_t DIM = 2

Private Functions

template <class D_LABELS_A, class D_LABELS_B>
auto merge_ufd(const xt::xexpression<D_LABELS_A> &e_labels_a, const xt::xexpression<D_LABELS_B> &e_labels_b)
template <class D_LABELS>
auto merge_ufd2(const xt::xexpression<D_LABELS> &e_labels)
template <class F>
auto _build_(xt::xtensor<uint64_t, DIM, xt::layout_type::row_major> &res, F &&f)
template <class D_LABELS_A, class D_LABELS_B>
auto merge_ufd(const xt::xexpression<D_LABELS_A> &e_labels_a, const xt::xexpression<D_LABELS_B> &e_labels_b)
template <class D_LABELS>
auto merge_ufd2(const xt::xexpression<D_LABELS> &e_labels)
template <class F>
auto do_it(xt::xtensor<int, DIM, xt::layout_type::row_major> &res, F &&f)

Private Members

const PixelWiseLmcObjective<DIM> &objective_
nifty::ufd::Ufd<uint64_t> ufd_
std::shared_ptr<CCLmcFactoryBase> solver_fatory_
template <>
template<>
class PixelWiseLmcConnetedComponentsFusion<3>

Public Types

typedef nifty::graph::UndirectedGraph CCGraphType
typedef LiftedMulticutObjective<CCGraphType, double> CCObjectiveType
typedef LiftedMulticutBase<CCObjectiveType> CCBaseType
typedef CCBaseType::VisitorBaseType CVisitorBaseType
typedef CCBaseType::NodeLabelsType CCNodeLabels
typedef nifty::graph::opt::common::SolverFactoryBase<CCBaseType> CCLmcFactoryBase

Public Functions

PixelWiseLmcConnetedComponentsFusion(const PixelWiseLmcObjective<DIM> &objective, std::shared_ptr<CCLmcFactoryBase> solver_fatory)
template <class D_LABELS_A, class D_LABELS_B>
auto fuse(const xt::xexpression<D_LABELS_A> &e_labels_a, const xt::xexpression<D_LABELS_B> &e_labels_b)
template <class D_LABELS>
auto fuse(const xt::xexpression<D_LABELS> &e_labels)

Public Static Attributes

const std::size_t DIM = 3

Private Functions

template <class D_LABELS_A, class D_LABELS_B>
auto merge_ufd(const xt::xexpression<D_LABELS_A> &e_labels_a, const xt::xexpression<D_LABELS_B> &e_labels_b)
template <class D_LABELS>
auto merge_ufd2(const xt::xexpression<D_LABELS> &e_labels)
template <class F>
auto _build_(xt::xtensor<int, DIM, xt::layout_type::row_major> &res, F &&f)

Private Members

const PixelWiseLmcObjective<DIM> &objective_
nifty::ufd::Ufd<uint64_t> ufd_
std::shared_ptr<CCLmcFactoryBase> solver_fatory_
template <std::size_t DIM>
class PixelWiseLmcObjective

Public Types

typedef nifty::graph::UndirectedGridGraph<DIM, true> GraphType
typedef LiftedMulticutObjective<GraphType, double> ObjectiveType
typedef LiftedMulticutBase<ObjectiveType> BaseType
typedef BaseType::VisitorBaseType VisitorBaseType
typedef BaseType::NodeLabelsType NodeLabels
typedef nifty::graph::opt::common::SolverFactoryBase<BaseType> LmcFactoryBase
typedef std::shared_ptr<LmcFactoryBase> LmcFactoryBaseSharedPtr

Public Functions

PixelWiseLmcObjective()
template <class D_WEIGHTS, class D_OFFSETS>
PixelWiseLmcObjective(const xt::xexpression<D_WEIGHTS> &e_weights, const xt::xexpression<D_OFFSETS> &e_offsets)
template <class D_LABELS>
auto evaluate(const xt::xexpression<D_LABELS> &e_labels) const
const auto &weights() const
const auto &offsets() const
const auto &shape() const
auto n_offsets() const
auto n_variables() const
template <class D_LABELS>
auto optimize(LmcFactoryBaseSharedPtr factory, const xt::xexpression<D_LABELS> &e_labels, const bool verbose = false) const
PixelWiseLmcObjective()
template <class D_WEIGHTS, class D_OFFSETS>
PixelWiseLmcObjective(const xt::xexpression<D_WEIGHTS> &e_weights, const xt::xexpression<D_OFFSETS> &e_offsets)
template <class D_LABELS>
auto evaluate(const xt::xexpression<D_LABELS> &e_labels) const
const auto &weights() const
const auto &offsets() const
const auto &shape() const
auto n_offsets() const
auto n_variables() const

Private Members

xt::xtensor<int, 2, xt::layout_type::row_major> offsets_
xt::xtensor<float, DIM+1, xt::layout_type::row_major> weights_
std::array<int, DIM> shape_
std::size_t n_offsets_
uint64_t n_variables_
template <class GRAPH, class ACC_0, class ACC_1, bool ENABLE_UCM>
class ProbabilisticLiftedClusterPolicy

Public Types

typedef Acc0Type::SettingsType Acc0SettingsType
typedef Acc1Type::SettingsType Acc1SettingsType
typedef GRAPH GraphType
typedef FloatEdgeMap EdgePrioType
typedef FloatEdgeMap EdgeSizesType
typedef FloatNodeMap NodeSizesType
typedef EdgeContractionGraph<GraphType, SelfType> EdgeContractionGraphType

Public Functions

template <class MERGE_PRIOS, class NOT_MERGE_PRIOS, class IS_LOCAL_EDGE, class EDGE_SIZES>
ProbabilisticLiftedClusterPolicy(const GraphType &graph, const MERGE_PRIOS &mergePrios, const NOT_MERGE_PRIOS &notMergePrios, const IS_LOCAL_EDGE &isLocalEdge, const EDGE_SIZES &edgeSizes, const SettingsType &settings = SettingsType ())
std::pair<uint64_t, double> edgeToContractNext() const
bool isDone()
FixationClusterPolicy<GRAPH, ACC_0, ACC_1, ENABLE_UCM>::EdgeContractionGraphType &edgeContractionGraph()
void contractEdge(const uint64_t edgeToContract)
void mergeNodes(const uint64_t aliveNode, const uint64_t deadNode)
void mergeEdges(const uint64_t aliveEdge, const uint64_t deadEdge)
void contractEdgeDone(const uint64_t edgeToContract)

Private Types

typedef GRAPH:: template EdgeMap<uint8_t> nifty::graph::agglo::ProbabilisticLiftedClusterPolicy::UInt8EdgeMap
typedef GRAPH:: template EdgeMap<double> nifty::graph::agglo::ProbabilisticLiftedClusterPolicy::FloatEdgeMap
typedef GRAPH:: template NodeMap<double> nifty::graph::agglo::ProbabilisticLiftedClusterPolicy::FloatNodeMap
typedef ACC_0 Acc0Type
typedef ACC_1 Acc1Type
typedef nifty::tools::ChangeablePriorityQueue<double, std::greater<double>> QueueType

Private Functions

double pqMergePrio(const uint64_t edge) const

Private Members

Probabilistictypedef FixationClusterPolicy< GRAPH, ACC_0, ACC_1, ENABLE_UCM > nifty::graph::agglo::ProbabilisticLiftedClusterPolicy::SelfType
const GraphType &graph_
ACC_0 acc0_
ACC_1 acc1_
UInt8EdgeMap isLocalEdge_
UInt8EdgeMap isPureLocal_
UInt8EdgeMap isPureLifted_
SettingsType settings_
EdgeContractionGraphType edgeContractionGraph_
QueueType pq_
uint64_t edgeToContractNext_
double edgeToContractNextMergePrio_

Friends

friend nifty::graph::agglo::ProbabilisticLiftedClusterPolicy::EdgeContractionGraph< GraphType, SelfType, ENABLE_UCM >
template <class T0, class T1>
struct PromoteTraits

Public Types

typedef vigra::PromoteTraits<T0, T1>::Promote PromoteType
typedef vigra::NumericTraits<PromoteType>::RealPromote RealPromoteType
template <class OBJECTIVE>
class ProposalGeneratorBase

Subclassed by nifty::graph::opt::common::GreedyAdditiveMulticutProposals< OBJECTIVE >, nifty::graph::opt::common::InterfaceFlipperProposalGenerator< OBJECTIVE >, nifty::graph::opt::common::RandomNodeColorProposalGenerator< OBJECTIVE >, nifty::graph::opt::common::StubProposalGenerator< OBJECTIVE >, nifty::graph::opt::common::WatershedProposalGenerator< OBJECTIVE >

Public Types

typedef OBJECTIVE ObjectiveType
typedef ObjectiveType::GraphType:: template NodeMap<uint64_t> nifty::graph::opt::common::ProposalGeneratorBase::ProposalType

Public Functions

virtual ~ProposalGeneratorBase()
virtual void generateProposal(const ProposalType &currentBest, ProposalType &labels, const size_t tid) = 0
template <class OBJECTIVE>
class ProposalGeneratorBase

Subclassed by nifty::graph::opt::lifted_multicut::WatershedProposalGenerator< OBJECTIVE >

Public Types

typedef OBJECTIVE ObjectiveType
typedef LiftedMulticutBase<ObjectiveType> LiftedMulticutBaseType
typedef ObjectiveType::GraphType GraphType
typedef ObjectiveType::LiftedGraphType LiftedGraphType
typedef LiftedMulticutBaseType::NodeLabelsType NodeLabelsType

Public Functions

virtual ~ProposalGeneratorBase()
virtual void generateProposal(const NodeLabelsType &currentBest, NodeLabelsType &labels, const size_t tid) = 0
template <class OBJECTIVE>
class ProposalGeneratorBase

Subclassed by nifty::graph::opt::mincut::RandomProposalGenerator< OBJECTIVE >

Public Types

typedef OBJECTIVE ObjectiveType
typedef MincutBase<ObjectiveType> MincutBaseType
typedef ObjectiveType::GraphType GraphType
typedef ObjectiveType::LiftedGraphType LiftedGraphType
typedef MincutBaseType::NodeLabels NodeLabels

Public Functions

virtual ~ProposalGeneratorBase()
virtual void generateProposal(const NodeLabels &currentBest, NodeLabels &labels, const size_t tid) = 0
template <class PROPOSAL_GENERATOR>
class ProposalGeneratorFactory

Inherits from nifty::graph::opt::lifted_multicut::ProposalGeneratorFactoryBase< PROPOSAL_GENERATOR::ObjectiveType >

Public Types

typedef PROPOSAL_GENERATOR ProposalGeneratorType
typedef ProposalGeneratorType::SettingsType SettingsType
typedef ProposalGeneratorType::ObjectiveType ObjectiveType
typedef ProposalGeneratorBase<ObjectiveType> ProposalGeneratorBaseType

Public Functions

ProposalGeneratorFactory(const SettingsType &settings = SettingsType ())
virtual ~ProposalGeneratorFactory()
virtual std::shared_ptr<ProposalGeneratorBaseType> createShared(const ObjectiveType &objective, const size_t numberOfThreads)
virtual ProposalGeneratorBaseType *create(const ObjectiveType &objective, const size_t numberOfThreads)

Private Members

SettingsType settings_
template <class PROPOSAL_GENERATOR>
class ProposalGeneratorFactory

Inherits from nifty::graph::opt::mincut::ProposalGeneratorFactoryBase< PROPOSAL_GENERATOR::ObjectiveType >

Public Types

typedef PROPOSAL_GENERATOR ProposalGeneratorType
typedef ProposalGeneratorType::SettingsType SettingsType
typedef ProposalGeneratorType::ObjectiveType ObjectiveType
typedef ProposalGeneratorBase<ObjectiveType> ProposalGeneratorBaseType

Public Functions

ProposalGeneratorFactory(const SettingsType &settings = SettingsType ())
virtual ~ProposalGeneratorFactory()
virtual std::shared_ptr<ProposalGeneratorBaseType> createShared(const ObjectiveType &objective, const size_t numberOfThreads)
virtual ProposalGeneratorBaseType *create(const ObjectiveType &objective, const size_t numberOfThreads)

Private Members

SettingsType settings_
template <class PROPOSAL_GENERATOR>
class ProposalGeneratorFactory

Inherits from nifty::graph::opt::common::ProposalGeneratorFactoryBase< PROPOSAL_GENERATOR::ObjectiveType >

Public Types

typedef PROPOSAL_GENERATOR ProposalGeneratorType
typedef ProposalGeneratorType::SettingsType SettingsType
typedef ProposalGeneratorType::ObjectiveType ObjectiveType
typedef ProposalGeneratorBase<ObjectiveType> ProposalGeneratorBaseType

Public Functions

ProposalGeneratorFactory(const SettingsType &settings = SettingsType ())
virtual ~ProposalGeneratorFactory()
virtual std::shared_ptr<ProposalGeneratorBaseType> createShared(const ObjectiveType &objective, const size_t numberOfThreads)
virtual ProposalGeneratorBaseType *create(const ObjectiveType &objective, const size_t numberOfThreads)

Private Members

SettingsType settings_
template <class OBJECTIVE>
class ProposalGeneratorFactoryBase

Subclassed by nifty::graph::opt::lifted_multicut::PyProposalGeneratorFactoryBase< OBJECTIVE >

Public Types

typedef OBJECTIVE ObjectiveType
typedef ProposalGeneratorBase<ObjectiveType> ProposalGeneratorBaseType

Public Functions

virtual ~ProposalGeneratorFactoryBase()
virtual std::shared_ptr<ProposalGeneratorBaseType> createShared(const ObjectiveType &objective, const size_t numberOfThreads) = 0
virtual ProposalGeneratorBaseType *create(const ObjectiveType &objective, const size_t numberOfThreads) = 0
template <class OBJECTIVE>
class ProposalGeneratorFactoryBase

Public Types

typedef OBJECTIVE ObjectiveType
typedef ProposalGeneratorBase<ObjectiveType> ProposalGeneratorBaseType

Public Functions

virtual ~ProposalGeneratorFactoryBase()
virtual std::shared_ptr<ProposalGeneratorBaseType> createShared(const ObjectiveType &objective, const size_t numberOfThreads) = 0
virtual ProposalGeneratorBaseType *create(const ObjectiveType &objective, const size_t numberOfThreads) = 0
template <class OBJECTIVE>
class ProposalGeneratorFactoryBase

Subclassed by nifty::graph::opt::common::ProposalGeneratorFactory< PROPOSAL_GENERATOR >, nifty::graph::opt::common::PyProposalGeneratorFactoryBase< OBJECTIVE >

Public Types

typedef OBJECTIVE ObjectiveType
typedef ObjectiveType::GraphType GraphType
typedef ProposalGeneratorBase<ObjectiveType> ProposalGeneratorBaseType

Public Functions

virtual ~ProposalGeneratorFactoryBase()
virtual std::shared_ptr<ProposalGeneratorBaseType> createShared(const ObjectiveType &objective, const size_t numberOfThreads) = 0
virtual ProposalGeneratorBaseType *create(const ObjectiveType &objective, const size_t numberOfThreads) = 0
class Proxy

Public Functions

template<>
Proxy(T *ptr, const size_t size)
template<>
const T &operator[](const size_t i) const
template<>
T &operator[](const size_t i)

Private Members

template<>
T *ptr_
template<>
size_t size_
class Proxy

Public Functions

template<>
Proxy(ARRAY &array, const uint64_t node)
template<>
const_reference operator[](const size_t i) const
template<>
reference operator[](const size_t i)
template<>
size_t size() const

Private Members

template<>
uint64_t node_
template<>
ARRAY *array_
template <class OBJECTIVE>
class PyLiftedMulticutBase

Inherits from nifty::graph::opt::lifted_multicut::LiftedMulticutBase< OBJECTIVE >

Public Types

typedef OBJECTIVE ObjectiveType
typedef LiftedMulticutVisitorBase<OBJECTIVE> VisitorBaseType
typedef LiftedMulticutBase<ObjectiveType> McBase
typedef ObjectiveType::GraphType GraphType
typedef GraphType:: template EdgeMap<uint8_t> nifty::graph::opt::lifted_multicut::PyLiftedMulticutBase::EdgeLabels
typedef GraphType:: template NodeMap<uint64_t> nifty::graph::opt::lifted_multicut::PyLiftedMulticutBase::NodeLabelsType

Public Functions

void optimize(NodeLabelsType &nodeLabels, VisitorBaseType *visitor)
const NodeLabelsType &currentBestNodeLabels()
double currentBestEnergy()
const ObjectiveType &objective() const
std::string name() const
template <class OBJECTIVE>
class PyLiftedMulticutVisitorBase

Inherits from nifty::graph::opt::common::VisitorBase< OBJECTIVE >

Public Types

typedef OBJECTIVE ObjectiveType
typedef LiftedMulticutVisitorBase<OBJECTIVE> VisitorBaseType
typedef LiftedMulticutBase<ObjectiveType> LmcBase
typedef ObjectiveType::GraphType GraphType

Public Functions

void begin(LmcBase *mcBase)
bool visit(LmcBase *mcBase)
void end(LmcBase *mcBase)
void addLogNames(std::initializer_list<std::string> logNames)
void setLogValue(const std::size_t logIndex, double logValue)
template <typename Type, size_t DIM, bool AUTO_CAST_TYPE>
struct pymarray_caster

Subclassed by pybind11::detail::type_caster< nifty::marray::PyView< Type, DIM, AUTO_CAST_TYPE > >

Public Types

typedef nifty::marray::PyView<Type, DIM, AUTO_CAST_TYPE> ViewType
typedef type_caster<typename intrinsic_type<Type>::type> value_conv
typedef std::conditional<AUTO_CAST_TYPE, pybind11::array_t<Type, py::array::forcecast>, pybind11::array_t<Type, py::array::c_style>>::type pyarray_type
typedef type_caster<pyarray_type> pyarray_conv

Public Functions

bool load(handle src, bool convert)
pybind11::detail::pymarray_caster::PYBIND11_TYPE_CASTER(ViewType, _("array<")+value_conv::name()+_(">"))

Public Static Functions

static handle cast(ViewType src, return_value_policy policy, handle parent)
template <class OBJECTIVE>
class PyMincutBase

Inherits from nifty::graph::opt::mincut::MincutBase< OBJECTIVE >

Public Types

typedef OBJECTIVE ObjectiveType
typedef MincutVisitorBase<OBJECTIVE> VisitorBaseType
typedef MincutBase<ObjectiveType> McBase
typedef ObjectiveType::GraphType GraphType
typedef McBase::NodeLabelsType NodeLabelsType

Public Functions

void optimize(NodeLabelsType &nodeLabels, VisitorBaseType *visitor)
const NodeLabelsType &currentBestNodeLabels()
double currentBestEnergy()
const ObjectiveType &objective() const
std::string name() const
template <class OBJECTIVE>
class PyMincutVisitorBase

Inherits from nifty::graph::opt::common::VisitorBase< OBJECTIVE >

Public Types

typedef OBJECTIVE ObjectiveType
typedef MincutVisitorBase<OBJECTIVE> VisitorBaseType
typedef MincutBase<ObjectiveType> McBase
typedef ObjectiveType::GraphType GraphType

Public Functions

void begin(McBase *mcBase)
bool visit(McBase *mcBase)
void end(McBase *mcBase)
void addLogNames(std::initializer_list<std::string> logNames)
void setLogValue(const std::size_t logIndex, double logValue)
template <class OBJECTIVE>
class PyMinstcutBase

Inherits from nifty::graph::opt::minstcut::MinstcutBase< OBJECTIVE >

Public Types

typedef OBJECTIVE ObjectiveType
typedef MinstcutVisitorBase<OBJECTIVE> VisitorBaseType
typedef MinstcutBase<ObjectiveType> McBase
typedef ObjectiveType::GraphType GraphType
typedef McBase::NodeLabelsType NodeLabelsType

Public Functions

void optimize(NodeLabelsType &nodeLabels, VisitorBaseType *visitor)
const NodeLabelsType &currentBestNodeLabels()
double currentBestEnergy()
const ObjectiveType &objective() const
std::string name() const
template <class OBJECTIVE>
class PyMinstcutVisitorBase

Inherits from nifty::graph::opt::common::VisitorBase< OBJECTIVE >

Public Types

typedef OBJECTIVE ObjectiveType
typedef MinstcutVisitorBase<OBJECTIVE> VisitorBaseType
typedef MinstcutBase<ObjectiveType> McBase
typedef ObjectiveType::GraphType GraphType

Public Functions

void begin(McBase *mcBase)
bool visit(McBase *mcBase)
void end(McBase *mcBase)
void addLogNames(std::initializer_list<std::string> logNames)
void setLogValue(const std::size_t logIndex, double logValue)
template <class OBJECTIVE>
class PyMulticutBase

Inherits from nifty::graph::opt::multicut::MulticutBase< OBJECTIVE >, nifty::graph::opt::multicut::MulticutBase< OBJECTIVE >

Public Types

typedef OBJECTIVE ObjectiveType
typedef MulticutVisitorBase<OBJECTIVE> VisitorBaseType
typedef MulticutBase<ObjectiveType> McBase
typedef ObjectiveType::GraphType GraphType
typedef GraphType:: template EdgeMap<uint8_t> nifty::graph::opt::multicut::PyMulticutBase::EdgeLabels
typedef GraphType:: template NodeMap<uint64_t> nifty::graph::opt::multicut::PyMulticutBase::NodeLabelsType
typedef OBJECTIVE ObjectiveType
typedef MulticutVisitorBase<OBJECTIVE> VisitorBaseType
typedef MulticutBase<ObjectiveType> McBase
typedef ObjectiveType::GraphType GraphType
typedef GraphType:: template EdgeMap<uint8_t> nifty::graph::opt::multicut::PyMulticutBase::EdgeLabels
typedef GraphType:: template NodeMap<uint64_t> nifty::graph::opt::multicut::PyMulticutBase::NodeLabelsType

Public Functions

void optimize(NodeLabelsType &nodeLabels, VisitorBaseType *visitor)
const NodeLabelsType &currentBestNodeLabels()
double currentBestEnergy()
const ObjectiveType &objective() const
std::string name() const
void optimize(NodeLabelsType &nodeLabels, VisitorBaseType *visitor)
const NodeLabelsType &currentBestNodeLabels()
double currentBestEnergy()
const ObjectiveType &objective() const
std::string name() const
template <class OBJECTIVE>
class PyMulticutVisitorBase

Inherits from nifty::graph::opt::common::VisitorBase< OBJECTIVE >, nifty::graph::opt::common::VisitorBase< OBJECTIVE >

Public Types

typedef OBJECTIVE ObjectiveType
typedef MulticutVisitorBase<OBJECTIVE> VisitorBaseType
typedef MulticutBase<ObjectiveType> McBase
typedef ObjectiveType::GraphType GraphType
typedef OBJECTIVE ObjectiveType
typedef MulticutVisitorBase<OBJECTIVE> VisitorBaseType
typedef MulticutBase<ObjectiveType> McBase
typedef ObjectiveType::GraphType GraphType

Public Functions

void begin(McBase *mcBase)
bool visit(McBase *mcBase)
void end(McBase *mcBase)
void addLogNames(std::initializer_list<std::string> logNames)
void setLogValue(const std::size_t logIndex, double logValue)
void begin(McBase *mcBase)
bool visit(McBase *mcBase)
void end(McBase *mcBase)
void addLogNames(std::initializer_list<std::string> logNames)
void setLogValue(const std::size_t logIndex, double logValue)
template <class OBJECTIVE>
class PyProposalGeneratorFactoryBase

Inherits from nifty::graph::opt::lifted_multicut::ProposalGeneratorFactoryBase< OBJECTIVE >

Public Types

typedef OBJECTIVE ObjectiveType
typedef ProposalGeneratorBase<ObjectiveType> ProposalGeneratorBaseType

Public Functions

std::shared_ptr<ProposalGeneratorBaseType> createShared(const ObjectiveType &objective, const size_t numberOfThreads)
ProposalGeneratorBaseType *create(const ObjectiveType &objective, const size_t numberOfThreads)
template <class OBJECTIVE>
class PyProposalGeneratorFactoryBase

Inherits from nifty::graph::opt::common::ProposalGeneratorFactoryBase< OBJECTIVE >

Public Types

typedef OBJECTIVE ObjectiveType
typedef ObjectiveType::GraphType GraphType
typedef ProposalGeneratorBase<ObjectiveType> ProposalGeneratorBaseType

Public Functions

std::shared_ptr<ProposalGeneratorBaseType> createShared(const ObjectiveType &objective, const size_t numberOfThreads)
ProposalGeneratorBaseType *create(const ObjectiveType &objective, const size_t numberOfThreads)
template <class SOLVER_BASE>
class PySolverFactoryBase

Inherits from nifty::graph::opt::common::SolverFactoryBase< SOLVER_BASE >

Public Types

typedef SolverFactoryBase<SOLVER_BASE> BaseType
typedef SOLVER_BASE SolverBaseType
typedef SolverBaseType::ObjectiveType ObjectiveType

Public Functions

std::shared_ptr<SolverBaseType> createShared(const ObjectiveType &objective)
SolverBaseType *create(const ObjectiveType &objective)
template <typename VALUE_TYPE, size_t DIM = 0, bool AUTO_CAST_TYPE = true>
class PyView

Inherits from andres::View< VALUE_TYPE, false >

Public Functions

template <class ShapeIterator>
PyView(pybind11::array_t<VALUE_TYPE> array, VALUE_TYPE *data, ShapeIterator begin, ShapeIterator end)
PyView()
const VALUE_TYPE &operator[](const uint64_t index) const
VALUE_TYPE &operator[](const uint64_t index)
template <class ShapeIterator>
PyView(ShapeIterator begin, ShapeIterator end)
template <class ShapeIterator>
void reshapeIfEmpty(ShapeIterator begin, ShapeIterator end)
template <class T_INIT>
PyView(std::initializer_list<T_INIT> shape)
template <class T_INIT>
void reshapeIfEmpty(std::initializer_list<T_INIT> shape)
void createViewFrom(const nifty::marray::View<VALUE_TYPE> &view)

Private Functions

template <class ShapeIterator>
void assignFromShape(ShapeIterator begin, ShapeIterator end)

Private Members

std::conditional<AUTO_CAST_TYPE, pybind11::array_t<VALUE_TYPE, py::array::forcecast>, pybind11::array_t<VALUE_TYPE, py::array::c_style>>::type py_array

Friends

friend nifty::marray::PyView::pybind11::detail::pymarray_caster< VALUE_TYPE, DIM, AUTO_CAST_TYPE >
template <class T = double>
class RandError

Public Types

typedef T value_type

Public Functions

template <class ITERATOR_TRUTH, class ITERATOR_PRED>
RandError(ITERATOR_TRUTH begin0, ITERATOR_TRUTH end0, ITERATOR_PRED begin1, bool ignoreDefaultLabel = false)
size_t elements() const
size_t pairs() const
size_t trueJoins() const
size_t trueCuts() const
size_t falseJoins() const
size_t falseCuts() const
size_t joinsInPrediction() const
size_t cutsInPrediction() const
size_t joinsInTruth() const
size_t cutsInTruth() const
value_type recallOfCuts() const
value_type precisionOfCuts() const
value_type recallOfJoins() const
value_type precisionOfJoins() const
value_type error() const
value_type index() const

Private Members

size_t elements_
size_t trueJoins_ = { size_t() }
size_t trueCuts_ = { size_t() }
size_t falseJoins_ = { size_t() }
size_t falseCuts_ = { size_t() }
template <class OBJECTIVE>
class RandomNodeColorProposalGenerator

Inherits from nifty::graph::opt::common::ProposalGeneratorBase< OBJECTIVE >

Public Types

typedef OBJECTIVE ObjectiveType
typedef ObjectiveType::GraphType GraphType
typedef GraphType:: template NodeMap<uint64_t> nifty::graph::opt::common::RandomNodeColorProposalGenerator::ProposalType
typedef GraphType:: template NodeMap<bool> nifty::graph::opt::common::RandomNodeColorProposalGenerator::IsUsed

Public Functions

RandomNodeColorProposalGenerator(const ObjectiveType &objective, const size_t numberOfThreads, const SettingsType &settings = SettingsType ())
void reset()
virtual ~RandomNodeColorProposalGenerator()
virtual void generateProposal(const ProposalType &currentBest, ProposalType &proposal, const size_t tid)

Private Members

const ObjectiveType &objective_
size_t numberOfThreads_
SettingsType settings_
std::vector<std::mt19937> gens_
std::uniform_int_distribution colorDist_
template <class OBJECTIVE>
class RandomProposalGenerator

Inherits from nifty::graph::opt::mincut::ProposalGeneratorBase< OBJECTIVE >

Public Types

typedef OBJECTIVE ObjectiveType
typedef MincutBase<ObjectiveType> MincutBaseType
typedef ObjectiveType::GraphType GraphType
typedef ObjectiveType::LiftedGraphType LiftedGraphType
typedef MincutBaseType::NodeLabels NodeLabels
typedef GraphType:: template EdgeMap<float> nifty::graph::opt::mincut::RandomProposalGenerator::EdgeWeights

Public Functions

RandomProposalGenerator(const ObjectiveType &objective, const size_t numberOfThreads, const SettingsType &settings = SettingsType ())
void reset()
virtual ~RandomProposalGenerator()
virtual void generateProposal(const NodeLabels &currentBest, NodeLabels &proposal, const size_t tid)

Private Members

const ObjectiveType &objective_
size_t numberOfThreads_
SettingsType settings_
std::vector<std::mt19937> gens_
template <class G, class T>
class RankOrderEdgeMap

Public Types

typedef G GraphType
typedef nifty::histogram::Histogram<double, double> HistogramType
typedef GraphType:: template EdgeMap<HistogramType> nifty::graph::agglo::merge_rules::RankOrderEdgeMap::HistogramEdgeMapType
typedef GraphType:: template EdgeMap<T> nifty::graph::agglo::merge_rules::RankOrderEdgeMap::SizeEdgeMapType
typedef RankOrderSettings SettingsType

Public Functions

auto name() const
template <class VALUES, class WEIGHTS>
RankOrderEdgeMap(const GraphType &g, const VALUES &values, const WEIGHTS &weights, const SettingsType &settings = SettingsType ())
void merge(const uint64_t aliveEdge, const uint64_t deadEdge)
void setValueFrom(const uint64_t targetEdge, const uint64_t sourceEdge)
void setFrom(const uint64_t targetEdge, const uint64_t sourceEdge)
void set(const uint64_t targetEdge, const T &value, const T &weight)
T operator[](const uint64_t edge) const

Public Static Functions

static auto staticName()

Private Members

HistogramEdgeMapType histogram_
SettingsType settings_
struct RankOrderSettings

Public Functions

auto name() const

Public Members

double q = {0.5}
uint16_t numberOfBins = {50}
template <class LABELS_PROXY>
struct RefHelper

Public Types

typedef const LABELS_PROXY &type
template <size_t DIM, class LABEL_TYPE>
template<>
struct RefHelper<ExplicitLabels<DIM, LABEL_TYPE>>

Public Types

typedef ExplicitLabels<DIM, LABEL_TYPE> type
class ResetNotSupported

Inherits from runtime_error

Public Functions

ResetNotSupported(const std::string msg = std::string())
template <typename T, typename U>
struct result

Inherits from half_float::detail::enable< expr, T, U >

template <>
template<>
struct result<half, half>

Public Types

typedef half type
template <class GRAPH, class QUEUE>
class SearchImpl

Public Types

typedef GRAPH GraphType
typedef GraphType:: template NodeMap<int64_t> nifty::graph::detail_graph::SearchImpl::PredecessorsMap
typedef GraphType:: template NodeMap<int64_t> nifty::graph::detail_graph::SearchImpl::DistanceMap

Public Functions

SearchImpl(const GraphType &g)
template <class F>
void graphNeighbourhood(const uint64_t source, const size_t maxDistance, F &&f)
void runSingleSourceSingleTarget(const int64_t source, const int64_t target = -1)
template <class SUBGRAPH_MASK>
void runSingleSourceSingleTarget(const int64_t source, const int64_t target, const SUBGRAPH_MASK &subgraphMask)
void runSingleSource(const int64_t source)
template <class SOURCE_ITER, class SUBGRAPH_MASK, class VISITOR>
void run(SOURCE_ITER sourceBegin, SOURCE_ITER sourceEnd, const SUBGRAPH_MASK &subgraphMask, VISITOR &&visitor)
const DistanceMap &distances() const
const PredecessorsMap predecessors() const

Private Types

typedef QUEUE Queue

Private Functions

template <class SUBGRAPH_MASK, class VISITOR>
void runImpl(const SUBGRAPH_MASK &subgraphMask, VISITOR &&visitor)
template <class SOURCE_ITER>
void initializeMaps(SOURCE_ITER sourceBegin, SOURCE_ITER sourceEnd)

Private Members

const GRAPH &g_
Queue queue_
PredecessorsMap predMap_
DistanceMap distMap_
template<>
struct Settings
template<>
struct Settings
struct SettingsType

Public Members

template<>
std::vector<std::shared_ptr<McFactoryBase>> multicutFactories
struct SettingsType

Public Members

template<>
Acc0SettingsType updateRule0
template<>
Acc1SettingsType updateRule1
template<>
bool zeroInit = false
template<>
uint64_t numberOfNodesStop = {1}
template<>
double stopPriority = {0.5}
struct SettingsType

Public Members

template<>
std::shared_ptr<FmMcFactoryBase> minCutFactory
struct SettingsType
struct SettingsType

Public Types

enum UpdateRule

Values:

SMOOTH_MAX
GENERALIZED_MEAN

Public Members

template<>
UpdateRule updateRule0 = {GENERALIZED_MEAN}
template<>
UpdateRule updateRule1 = {GENERALIZED_MEAN}
template<>
bool zeroInit = false
template<>
double p0 = {1.0}
template<>
double p1 = {1.0}
template<>
double gamma = {0.9} uint64_t numberOfNodesStop{1}
struct SettingsType

Public Members

template<>
std::shared_ptr<McFactoryBase> multicutFactory
struct SettingsType

Public Types

enum SeedingStrategie

Values:

SEED_FROM_NEGATIVE
SEED_FROM_ALL

Public Members

template<>
SeedingStrategie seedingStrategie = {SEED_FROM_NEGATIVE}
template<>
double sigma = {1.0}
template<>
double numberOfSeeds = {0.1}
struct SettingsType

Public Members

template<>
Acc0SettingsType updateRule0
template<>
Acc1SettingsType updateRule1
template<>
bool zeroInit = false
template<>
uint64_t numberOfNodesStop = {1}
template<>
double threshold
struct SettingsType

Public Members

template<>
std::shared_ptr<ProposalGeneratorFactoryBaseType> proposalGeneratorFactory
template<>
size_t numberOfIterations = {1000}
template<>
size_t stopIfNoImprovement = {10}
template<>
int numberOfThreads = {1}
struct SettingsType

Public Members

template<>
double sigma = {1.0}
template<>
double weightStopCond = {0.0}
template<>
double nodeNumStopCond = {-1.0}
struct SettingsType

Public Members

template<>
uint64_t numberOfNodesStop = {1}
struct SettingsType

Public Members

template<>
double sigma = {1.0}
template<>
double seedFraction = {0.1}
struct SettingsType

Public Functions

template<>
SettingsType()

Public Members

template<>
int numberOfThreads
template<>
array::StaticArray<int64_t, DIM> blockShape
struct SettingsType

Public Members

template<>
int verbose = { 1 }
template<>
int numberOfThreads = {-1}
template<>
size_t numberOfIterations = {10}
template<>
size_t numberOfParallelProposals = {4}
template<>
size_t fuseN = {2}
template<>
size_t stopIfNoImprovement = {4}
template<>
ProposalGenSettings proposalGenSettings
template<>
FusionMoveSettings fusionMoveSettings
struct SettingsType

Public Members

template<>
bool improve = {true}
struct SettingsType

Public Members

template<>
std::shared_ptr<FmMcFactoryBase> mincutFactory
struct SettingsType

Public Members

template<>
FactorySmartPtr mcFactory
template<>
size_t numberOfIterations = {100}
template<>
int numberOfThreads = {-1}
template<>
int verbose = 2
template<>
int seed = 42
template<>
NoiseType noiseType = {UNIFORM_NOISE}
template<>
double noiseMagnitude = {1.0}
struct SettingsType

Public Members

template<>
size_t numberOfIterations = {0}
template<>
bool addThreeCyclesConstraints = {true}
template<>
bool addOnlyViolatedThreeCyclesConstraints = {true}
template<>
IlpSettingsType ilpSettings = {}
struct SettingsType
struct SettingsType

Public Members

template<>
std::shared_ptr<SubmodelFactoryBase> submodelFactory
template<>
std::shared_ptr<FactoryBase> fallthroughFactory
struct SettingsType

Public Members

template<>
size_t numberOfColors = {size_t(2)}
struct SettingsType

Public Members

template<>
std::size_t numberOfInnerIterations = { std::numeric_limits<std::size_t>::max() }
template<>
std::size_t numberOfOuterIterations = { 100 }
template<>
double epsilon = { 1e-7 }
struct SettingsType

Public Members

template<>
std::shared_ptr<McFactoryBase> mcFactory
template<>
size_t numberOfIterations = {1000}
template<>
int verbose = {0}
template<>
size_t primalComputationInterval = {100}
template<>
std::string standardReparametrization = {"anisotropic"}
template<>
std::string roundingReparametrization = {"damped_uniform"}
template<>
std::string tightenReparametrization = {"damped_uniform"}
template<>
bool tighten = {true}
template<>
size_t tightenInterval = {100}
template<>
size_t tightenIteration = {10}
template<>
double tightenSlope = {0.02}
template<>
double tightenConstraintsPercentage = {0.1}
template<>
double minDualImprovement = {0.}
template<>
size_t minDualImprovementInterval = {0}
template<>
size_t timeout = {0}
template<>
size_t numberOfThreads = {1}
struct SettingsType

Public Members

template<>
double minimumNodeSize = {1.0}
template<>
double sizeRegularizer = {0.5}
template<>
double gamma = {0.999}
struct SettingsType

Public Members

template<>
size_t numberOfIterations = {0}
template<>
int verbose = { 0 }
template<>
bool verboseIlp = {false}
template<>
bool addThreeCyclesConstraints = {true}
template<>
bool addOnlyViolatedThreeCyclesConstraints = {true}
template<>
IlpSettings ilpSettings
struct SettingsType

Public Members

template<>
std::shared_ptr<FmLmcFactoryBase> lmcFactory
struct SettingsType

Public Members

template<>
double beta = {0.5}
template<>
double sizeRegularizer = {0.5}
template<>
uint64_t numberOfNodesStop = {1}
template<>
uint64_t numberOfEdgesStop = {0}
struct SettingsType

Public Members

template<>
std::size_t numberOfInnerIterations = { std::numeric_limits<std::size_t>::max() }
template<>
std::size_t numberOfOuterIterations = { 100 }
template<>
double epsilon = { 1e-7 }
struct SettingsType

Public Members

template<>
size_t numberOfInnerIterations = { std::numeric_limits<size_t>::max() }
template<>
size_t numberOfOuterIterations = { 100 }
template<>
double epsilon = { 1e-6 }
template<>
bool verbose = { false }
template<>
bool greedyWarmstart = {true}
struct SettingsType

Public Members

template<>
std::shared_ptr<FmMcFactoryBase> mcFactory
struct SettingsType

Public Members

template<>
uint64_t numberOfInnerIterations = { std::numeric_limits<uint64_t>::max() }
template<>
uint64_t numberOfOuterIterations = { 100 }
template<>
double epsilon = { 1e-6 }
template<>
bool verbose = { false }
struct SettingsType

Public Members

template<>
std::shared_ptr<typename LiftedRounder::PrimalRounderLmcFactoryBase> lmcFactory
template<>
bool greedyWarmstart = {true}
template<>
double tightenSlope = {0.05}
template<>
size_t tightenMinDualImprovementInterval = {0}
template<>
double tightenMinDualImprovement = {0.}
template<>
double tightenConstraintsPercentage = {0.1}
template<>
size_t tightenConstraintsMax = {0}
template<>
size_t tightenInterval = {10}
template<>
size_t tightenIteration = {100}
template<>
std::string tightenReparametrization = {"anisotropic"}
template<>
std::string roundingReparametrization = {"anisotropic"}
template<>
std::string standardReparametrization = {"anisotropic"}
template<>
bool tighten = {true}
template<>
size_t minDualImprovementInterval = {0}
template<>
double minDualImprovement = {0.}
template<>
size_t lowerBoundComputationInterval = {1}
template<>
size_t primalComputationInterval = {5}
template<>
size_t timeout = {0}
template<>
size_t maxIter = {1000}
template<>
size_t numLpThreads = {1}
struct SettingsType

Public Members

template<>
Acc0SettingsType updateRule0
template<>
Acc1SettingsType updateRule1
template<>
bool zeroInit = false
template<>
uint64_t numberOfNodesStop = {1}
struct SettingsType

Inherits from nifty::graph::agglo::EdgeWeightedClusterPolicySettings

Public Members

template<>
float threshold = {0.5}
template<>
bool verbose = {false}
template<>
int bincount = {40}
struct SettingsType

Public Types

enum SeedingStrategie

Values:

SEED_FROM_NEGATIVE
SEED_FROM_ALL

Public Members

template<>
SeedingStrategie seedingStrategie = {SEED_FROM_NEGATIVE}
template<>
double sigma = {1.0}
template<>
double numberOfSeeds = {0.1}
struct SettingsType

Public Members

template<>
AccSettingsType updateRule
template<>
uint64_t numberOfNodesStop = {1}
template<>
double stopPriority = {0.5}
struct SettingsType

Public Members

template<>
std::vector<std::shared_ptr<LmcFactoryBase>> factories
struct SettingsType

Public Types

enum SeedingStrategie

Values:

SEED_FROM_LIFTED
SEED_FROM_LOCAL
SEED_FROM_BOTH

Public Members

template<>
SeedingStrategie seedingStrategie = {SEED_FROM_LIFTED}
template<>
double sigma = {1.0}
template<>
double numberOfSeeds = {0.1}
struct SettingsType

Public Types

enum SeedingStrategie

Values:

SEED_FROM_LIFTED
SEED_FROM_LOCAL
SEED_FROM_BOTH

Public Members

template<>
SeedingStrategie seedingStrategie = {SEED_FROM_LIFTED}
template<>
double sigma = {1.0}
template<>
double numberOfSeeds = {0.1}
struct SettingsType

Public Members

template<>
std::shared_ptr<ProposalGeneratorFactoryBaseType> proposalGeneratorFactory
template<>
size_t numberOfIterations = {1000}
template<>
size_t stopIfNoImprovement = {10}
template<>
int numberOfThreads = {1}
template<>
int numberOfParallelProposals = {-1}
template<>
FusionMoveSettingsType fusionMoveSettings
struct SettingsType
struct SettingsType
struct SettingsType

Public Members

template<>
double nodeNumStopCond = {0.1}
template<>
double sizeRegularizer = {1.0}
template<>
bool doCutPhase = {true}
template<>
bool doBetterCutPhase = {false}
template<>
bool doGlueAndCutPhase = {true}
template<>
std::shared_ptr<MincutSubMcFactoryBase> mincutFactory
template<>
std::shared_ptr<MulticutSubMcFactoryBase> multicutFactory
template <class GRAPH, class WEIGHT_TYPE>
class ShortestPathBellmanFord

Public Types

typedef GRAPH GraphType
typedef WEIGHT_TYPE WeightType
typedef GraphType:: template NodeMap<int64_t> nifty::graph::ShortestPathBellmanFord::PredecessorsMap
typedef GraphType:: template NodeMap<WeightType> nifty::graph::ShortestPathBellmanFord::DistanceMap

Public Functions

ShortestPathBellmanFord(const GraphType &g)
template <class ArcWeights>
void runSingleSourceSingleTarget(ArcWeights arcWeights, const int64_t source, const int64_t target = -1)
template <class ArcWeights>
void runSingleSource(ArcWeights arcWeights, const int64_t source)
template <class ArcWeights, class SOURCE_ITER, class SUBGRAPH_MASK, class VISITOR>
void run(ArcWeights arcWeights, SOURCE_ITER sourceBegin, SOURCE_ITER sourceEnd, const SUBGRAPH_MASK &subgraphMask, VISITOR &&visitor)
const DistanceMap &distances() const
const PredecessorsMap predecessors() const

Private Functions

template <class ArcWeights, class SUBGRAPH_MASK, class VISITOR>
void runImpl(ArcWeights arcWeights, const SUBGRAPH_MASK &subgraphMask, VISITOR &&visitor)
template <class SOURCE_ITER>
void initializeMaps(SOURCE_ITER sourceBegin, SOURCE_ITER sourceEnd)

Private Members

const GRAPH &g_
PredecessorsMap predMap_
DistanceMap distMap_
template <class GRAPH, class WEIGHT_TYPE>
class ShortestPathDijkstra

Public Types

typedef GRAPH GraphType
typedef WEIGHT_TYPE WeightType
typedef GraphType:: template NodeMap<int64_t> nifty::graph::ShortestPathDijkstra::PredecessorsMap
typedef GraphType:: template NodeMap<WeightType> nifty::graph::ShortestPathDijkstra::DistanceMap

Public Functions

ShortestPathDijkstra(const GraphType &g)
template <class EDGE_WEGIHTS>
void runSingleSourceSingleTarget(const EDGE_WEGIHTS &edgeWeights, const int64_t source, const int64_t target = -1)
template <class EDGE_WEGIHTS>
void runSingleSourceMultiTarget(const EDGE_WEGIHTS &edgeWeights, const int64_t source, const std::vector<int64_t> &targets)
template <class EDGE_WEGIHTS>
void runSingleSource(EDGE_WEGIHTS edgeWeights, const int64_t source)
template <class EDGE_WEGIHTS, class SOURCE_ITER, class SUBGRAPH_MASK, class VISITOR>
void run(EDGE_WEGIHTS edgeWeights, SOURCE_ITER sourceBegin, SOURCE_ITER sourceEnd, const SUBGRAPH_MASK &subgraphMask, VISITOR &&visitor)
const DistanceMap &distances() const
const PredecessorsMap &predecessors() const

Private Types

typedef nifty::tools::ChangeablePriorityQueue<WeightType> PqType

Private Functions

template <class EDGE_WEGIHTS, class SUBGRAPH_MASK, class VISITOR>
void runImpl(const EDGE_WEGIHTS &edgeWeights, const SUBGRAPH_MASK &subgraphMask, VISITOR &&visitor)
template <class SOURCE_ITER>
void initializeMaps(SOURCE_ITER sourceBegin, SOURCE_ITER sourceEnd)

Private Members

const GRAPH &g_
PqType pq_
PredecessorsMap predMap_
DistanceMap distMap_
template <class ARC_INTERANL_TYPE = int64_t, class NODE_INTERNAL_TYPE = int64_t>
class SimpleDirectedGraph

Inherits from nifty::graph::DirectedGraphBase< SimpleDirectedGraph< ARC_INTERANL_TYPE, NODE_INTERNAL_TYPE > >

Public Types

typedef boost::counting_iterator<int64_t> NodeIter
typedef boost::counting_iterator<int64_t> ArcIter
typedef DirectedNodeStorage::const_iterator AdjacencyInIter
typedef DirectedNodeStorage::const_iterator AdjacencyOutIter
typedef ContiguousTag ArcIdTag
typedef ContiguousTag EdgeIdTag
typedef ContiguousTag NodeIdTag

Public Functions

SimpleDirectedGraph(const uint64_t numberOfNodes = 0, const uint64_t reserveNumberOfArcs = 0)
int64_t insertArc(const int64_t s, const int64_t t)
int64_t source(const int64_t a) const
int64_t target(const int64_t a) const
int64_t findArc(const int64_t s, const int64_t t)
int64_t nodeIdUpperBound() const
int64_t maxArcId() const
int64_t numberOfArcs() const
int64_t numberOfNodes() const
NodeIter nodesBegin() const
NodeIter nodesEnd() const
ArcIter arcsBegin() const
ArcIter arcsEnd() const
AdjacencyOutIter adjacencyOutBegin(const int64_t node) const
AdjacencyOutIter adjacencyOutEnd(const int64_t node) const
AdjacencyInIter adjacencyInBegin(const int64_t node) const
AdjacencyInIter adjacencyInEnd(const int64_t node) const

Private Types

typedef ARC_INTERANL_TYPE ArcInternalType
typedef NODE_INTERNAL_TYPE NodeInteralType
typedef detail_graph::DirectedAdjacency<int64_t, int64_t, NodeInteralType, ArcInternalType> NodeAdjacency
typedef std::set<NodeAdjacency> DirectedNodeStorage
typedef std::pair<DirectedNodeStorage, DirectedNodeStorage> NodeStorage
typedef std::pair<NodeInteralType, NodeInteralType> ArcStorage

Private Members

std::vector<NodeStorage> nodes_
std::vector<ArcStorage> arcs_
class SimpleGraphEdgeIter

Inherits from boost::counting_iterator< int64_t >

class SimpleGraphNodeIter

Inherits from boost::counting_iterator< int64_t >

template <class G, class T>
class SmoothMaxEdgeMap

Public Types

typedef G GraphType
typedef GraphType:: template EdgeMap<T> nifty::graph::agglo::merge_rules::SmoothMaxEdgeMap::MeanEdgeMapType
typedef GraphType:: template EdgeMap<nifty::float16_t> nifty::graph::agglo::merge_rules::SmoothMaxEdgeMap::SizeEdgeMapType
typedef SmoothMaxSettings SettingsType

Public Functions

auto name() const
template <class VALUES, class WEIGHTS>
SmoothMaxEdgeMap(const GraphType &g, const VALUES &values, const WEIGHTS &weights, const SettingsType &settings = SettingsType ())
void merge(const uint64_t aliveEdge, const uint64_t deadEdge)
void setValueFrom(const uint64_t targetEdge, const uint64_t sourceEdge)
void setFrom(const uint64_t targetEdge, const uint64_t sourceEdge)
void set(const uint64_t targetEdge, const T &value, const T &weight)
T operator[](const uint64_t edge) const

Public Static Functions

static auto staticName()

Private Members

MeanEdgeMapType values_
SizeEdgeMapType weights_
SettingsType settings_
struct SmoothMaxSettings

Public Functions

auto name() const

Public Members

double p = {1.0}
template <class OBJECTIVE, class CHILD>
class SolverBase

Subclassed by nifty::graph::opt::multicut::MulticutBase< PROPPOSAL_GEN::ObjectiveType >, nifty::graph::opt::multicut::MulticutBase< PROPPOSAL_GEN::ObjectiveType >

Public Types

typedef OBJECTIVE ObjectiveType
typedef SolverBase<ObjectiveType, CHILD> SelfType
typedef VisitorBase<CHILD> VisitorBaseType
typedef VisitorProxy<CHILD> VisitorProxyType
typedef ObjectiveType::GraphType GraphType
typedef ObjectiveType::NodeLabelsType NodeLabelsType

Public Functions

virtual ~SolverBase()
virtual void optimize(NodeLabelsType &nodeLabels, VisitorBaseType *visitor) = 0
virtual const ObjectiveType &objective() const = 0
virtual const NodeLabelsType &currentBestNodeLabels() = 0
virtual std::string name() const = 0
virtual void weightsChanged()
virtual double currentBestEnergy()
class SolverDocstringHelper

Public Functions

SolverDocstringHelper()
template <class SOLVER>
std::string solverDocstring() const
template <class FACTORY>
std::string factoryDocstring() const

Public Members

std::string mainText
std::string objectiveName
std::string objectiveClsName
std::string name
std::string clsName
std::vector<std::string> seeAlso
std::string warning
std::string note
std::vector<std::string> examples
std::vector<std::string> cites
std::vector<std::string> requirements
std::string factoryBaseClsName
std::string solverBaseClsName
std::string solverClsName
std::string factoryClsName
std::string factoryFactoryName

Private Functions

std::string upperFirst(const std::string &name) const
std::string insertTabs(const std::string &rawString) const
template <class SOLVER>
class SolverFactory

Inherits from nifty::graph::opt::common::SolverFactoryBase< SOLVER::BaseType >

Public Types

typedef SolverFactoryBase<typename SOLVER::BaseType> BaseType
typedef SOLVER SolverType
typedef SolverType::ObjectiveType ObjectiveType
typedef SolverType::BaseType SolverBaseType
typedef SolverType::SettingsType SettingsType

Public Functions

SolverFactory(const SettingsType &settings = SettingsType ())
virtual std::shared_ptr<SolverBaseType> createShared(const ObjectiveType &objective)
virtual SolverBaseType *create(const ObjectiveType &objective)

Private Members

SettingsType options_
template <class SOLVER_BASE>
class SolverFactoryBase

Subclassed by nifty::graph::opt::common::PySolverFactoryBase< SOLVER_BASE >

Public Types

typedef SOLVER_BASE SolverBaseType
typedef SolverBaseType::ObjectiveType ObjectiveType

Public Functions

virtual ~SolverFactoryBase()
virtual std::shared_ptr<SolverBaseType> createShared(const ObjectiveType &objective) = 0
virtual SolverBaseType *create(const ObjectiveType &objective) = 0
struct SortedTag
struct SparseTag
template <class T, size_t DIM>
class StaticArrayBase

Inherits from std::array< T, DIM >

Public Types

typedef std::array<T, DIM> BaseType

Public Functions

StaticArrayBase()
StaticArrayBase(const T &value)
template <class INIT_T>
StaticArrayBase(const std::initializer_list<INIT_T> &list)
const BaseType &asStdArray() const
BaseType &asStdArray()
template <class SHAPE>
bool allInsideShape(const SHAPE &shape) const
struct StructureTensorEigenvalues

Inherits from nifty::features::FilterBase

Public Functions

StructureTensorEigenvalues()
void operator()(const fastfilters_array2d_t &ff, marray::View<float> &out, const double sigma) const
void operator()(const fastfilters_array3d_t &ff, marray::View<float> &out, const double sigma) const
bool isMultiChannel() const
void setOuterScale(const double sigmaOuter)

Private Members

double sigmaOuter_
template <class OBJECTIVE>
class StubProposalGenerator

Inherits from nifty::graph::opt::common::ProposalGeneratorBase< OBJECTIVE >

Public Types

typedef OBJECTIVE ObjectiveType
typedef ObjectiveType::GraphType GraphType
typedef GraphType:: template NodeMap<uint64_t> nifty::graph::opt::common::StubProposalGenerator::ProposalType

Public Functions

StubProposalGenerator(const ObjectiveType &objective, const size_t numberOfThreads, const SettingsType &settings = SettingsType ())
virtual ~StubProposalGenerator()
virtual void generateProposal(const ProposalType &currentBest, ProposalType &proposal, const size_t tid)

Private Members

const ObjectiveType &objective_
size_t numberOfThreads_
SettingsType settings_
struct SubgraphWithCut

Public Functions

template<>
SubgraphWithCut(const IlpSovler &ilpSolver, const DenseIds &denseIds)
template<>
bool useNode(const size_t v) const
template<>
bool useEdge(const size_t e) const

Public Members

template<>
const IlpSovler &ilpSolver_
template<>
const DenseIds &denseIds_
struct SubgraphWithCut

Public Functions

template<>
SubgraphWithCut(const WeightsMap &weights)
template<>
bool useNode(const size_t v) const
template<>
bool useEdge(const size_t e) const

Public Members

template<>
const WeightsMap &weights_
template <class GRAPH, class NODE_LABELS>
struct SubgraphWithCutFromNodeLabels

Public Types

typedef GRAPH GraphType
typedef NODE_LABELS NodeLabelsType

Public Functions

SubgraphWithCutFromNodeLabels(const GraphType &graph, const NodeLabelsType &nodeLabels)
bool useNode(const uint64_t v) const
bool useEdge(const uint64_t graphEdge) const

Public Members

const GraphType &graph_
const NodeLabelsType &nodeLabels_
struct ThreadData

Public Functions

template<>
ThreadData(const size_t threadId, const int seed, const GraphType &graph)

Public Members

template<>
InternalObjective objective_
template<>
MulticutBaseType *solver_
template<>
std::mt19937 gen_
template<>
std::uniform_real_distribution distUniform01_
template<>
std::normal_distribution distNormal_
class ThreadPool

Public Functions

ThreadPool(const ParallelOptions &options)
ThreadPool(const int n)
~ThreadPool()
template <class F>
std::future<typename std::result_of<F(int)>::type> enqueueReturning(F &&f)
template <class F>
std::future<void> enqueue(F &&f)
void waitFinished()
size_t nThreads() const

Private Functions

void init(const ParallelOptions &options)

Private Members

std::vector<std::thread> workers
std::queue<std::function<void(int)>> tasks
std::mutex queue_mutex
std::condition_variable worker_condition
std::condition_variable finish_condition
bool stop
std::atomic<unsigned int> busy
std::atomic<unsigned int> processed
class Timer

Subclassed by nifty::tools::VerboseTimer

Public Functions

Timer()
double elapsedSeconds() const
Timer &reset()
void start()
Timer &stop()
std::string toString() const

Private Members

double seconds_
decltype(std::chrono::high_resolution_clock::now()) nifty::tools::Timer::timeObject_
template <size_t DIM>
class TopologicalGrid
template <>
template<>
class TopologicalGrid<2>

Public Functions

template <class T>
TopologicalGrid(const nifty::marray::View<T> &labels)
uint32_t operator()(const CoordinateType &coord) const
uint32_t operator()(const uint32_t x0, const uint32_t x1) const
const NumberOfCellsType &numberOfCells() const
const nifty::marray::Marray<uint32_t> &array() const
const CoordinateType &shape() const
const CoordinateType &topologicalGridShape() const

Private Types

typedef array::StaticArray<int64_t, 2> CoordinateType
typedef array::StaticArray<uint32_t, 3> NumberOfCellsType

Private Members

CoordinateType shape_
CoordinateType tShape_
NumberOfCellsType numberOfCells_
nifty::marray::Marray<uint32_t> tGrid_
struct TwoCutBuffers

Public Functions

template<>
TwoCutBuffers(const GraphType &graph)

Public Members

GraphType:: template NodeMap<uint64_t> nifty::graph::opt::multicut::KernighanLin< OBJECTIVE >::TwoCutBuffers::border
GraphType:: template NodeMap<double> nifty::graph::opt::multicut::KernighanLin< OBJECTIVE >::TwoCutBuffers::differences
GraphType:: template NodeMap<char> nifty::graph::opt::multicut::KernighanLin< OBJECTIVE >::TwoCutBuffers::is_moved
template<>
uint64_t max_not_used_label
GraphType:: template NodeMap<uint64_t> nifty::graph::opt::multicut::KernighanLin< OBJECTIVE >::TwoCutBuffers::referenced_by
template<>
NodeLabelsType vertex_labels
template <typename Type, size_t Size>
template<>
struct type_caster<nifty::array::StaticArray<Type, Size>>

Inherits from pybind11::detail::array_caster_< nifty::array::StaticArray< Type, Size >, Type, false, Size >

template <typename Type, size_t DIM, bool AUTO_CAST_TYPE>
template<>
struct type_caster<nifty::marray::PyView<Type, DIM, AUTO_CAST_TYPE>>

Inherits from pybind11::detail::pymarray_caster< Type, DIM, AUTO_CAST_TYPE >

template <class T = uint64_t>
class Ufd

Public Types

typedef T Index

Public Functions

Ufd(const Index size = 0)
void assign(const Index size = 0)
void reset()
Ufd<T>::Index find(const Index element) const
Ufd<T>::Index find(Index element)
Ufd<T>::Index numberOfElements() const
Ufd<T>::Index numberOfSets() const
template <class Iterator>
void elementLabeling(Iterator out) const
template <class Iterator>
void representatives(Iterator it) const
template <class MAP_LIKE>
void representativeLabeling(MAP_LIKE &out) const
void representativesToSets(std::vector<std::vector<Index>>&) const
void merge(Index element1, Index element2)
void insert(const Index number)

Private Members

std::vector<Index> parents_
std::vector<Index> ranks_
Index numberOfSets_
template <typename T>
struct unary_specialized

Public Static Functions

static HALF_CONSTEXPR half half_float::detail::unary_specialized::negate(half arg)
static half fabs(half arg)
template <>
template<>
struct unary_specialized<expr>

Public Static Functions

static HALF_CONSTEXPR expr half_float::detail::unary_specialized::negate(float arg)
static expr fabs(float arg)
struct UnaryFunction

Public Types

template<>
typedef NodeAdjacency value_type

Public Functions

template <class ADJ>
template<>
NodeAdjacency operator()(const ADJ &adjacency) const
template <class EDGE_INTERANL_TYPE = int64_t, class NODE_INTERNAL_TYPE = int64_t>
class UndirectedGraph

Inherits from nifty::graph::UndirectedGraphBase< UndirectedGraph< EDGE_INTERANL_TYPE, NODE_INTERNAL_TYPE >, detail_graph::SimpleGraphNodeIter, detail_graph::SimpleGraphEdgeIter, detail_graph::UndirectedGraphTypeHelper< EDGE_INTERANL_TYPE, NODE_INTERNAL_TYPE >::AdjacencyIter >

Public Types

typedef detail_graph::SimpleGraphNodeIter NodeIter
typedef boost::counting_iterator<int64_t> EdgeIter
typedef NodeStorage::const_iterator AdjacencyIter
typedef ContiguousTag EdgeIdTag
typedef ContiguousTag NodeIdTag
typedef SortedTag EdgeIdOrderTag
typedef SortedTag NodeIdOrderTag

Public Functions

UndirectedGraph(const uint64_t numberOfNodes = 0, const uint64_t reserveNumberOfEdges = 0)
void assign(const uint64_t numberOfNodes = 0, const uint64_t reserveNumberOfEdges = 0)
int64_t insertEdge(const int64_t u, const int64_t v)
int64_t u(const int64_t e) const
int64_t v(const int64_t e) const
int64_t findEdge(const int64_t u, const int64_t v) const
int64_t nodeIdUpperBound() const
int64_t edgeIdUpperBound() const
uint64_t numberOfEdges() const
uint64_t numberOfNodes() const
UndirectedGraph<EDGE_INTERANL_TYPE, NODE_INTERNAL_TYPE>::NodeIter nodesBegin() const
UndirectedGraph<EDGE_INTERANL_TYPE, NODE_INTERNAL_TYPE>::NodeIter nodesEnd() const
UndirectedGraph<EDGE_INTERANL_TYPE, NODE_INTERNAL_TYPE>::EdgeIter edgesBegin() const
UndirectedGraph<EDGE_INTERANL_TYPE, NODE_INTERNAL_TYPE>::EdgeIter edgesEnd() const
UndirectedGraph<EDGE_INTERANL_TYPE, NODE_INTERNAL_TYPE>::AdjacencyIter adjacencyBegin(const int64_t node) const
UndirectedGraph<EDGE_INTERANL_TYPE, NODE_INTERNAL_TYPE>::AdjacencyIter adjacencyEnd(const int64_t node) const
UndirectedGraph<EDGE_INTERANL_TYPE, NODE_INTERNAL_TYPE>::AdjacencyIter adjacencyOutBegin(const int64_t node) const
std::pair<int64_t, int64_t> uv(const int64_t e) const
template <class F>
void forEachEdge(F &&f) const
template <class F>
void forEachNode(F &&f) const
uint64_t serializationSize() const
template <class ITER>
void serialize(ITER iter) const
template <class ITER>
void deserialize(ITER iter)
UndirectedGraph<EDGE_INTERANL_TYPE, NODE_INTERNAL_TYPE> extractSubgraphFromNodes(const marray::View<NODE_INTERNAL_TYPE> &nodeList, std::vector<EDGE_INTERANL_TYPE> &innerEdgesOut, std::vector<EDGE_INTERANL_TYPE> &outerEdgesOut) const
void shrinkToFit()

Protected Types

typedef EDGE_INTERANL_TYPE EdgeInternalType
typedef NODE_INTERNAL_TYPE NodeInteralType
typedef detail_graph::UndirectedAdjacency<int64_t, int64_t, NodeInteralType, EdgeInternalType> NodeAdjacency
typedef nifty::container::BoostFlatSet<NodeAdjacency> NodeStorage
typedef std::pair<EdgeInternalType, EdgeInternalType> EdgeStorage

Protected Functions

bool insertEdgeOnlyInNodeAdj(const int64_t u, const int64_t v)
template <class PER_THREAD_DATA_VEC>
void mergeAdjacencies(PER_THREAD_DATA_VEC &perThreadDataVec, parallel::ThreadPool &threadpool)

Protected Attributes

std::vector<NodeStorage> nodes_
std::vector<EdgeStorage> edges_
template <class CHILD_GRAPH, class NODE_ITER, class EDGE_ITER, class ADJACENCY_ITER>
class UndirectedGraphBase

Public Types

typedef CHILD_GRAPH ChildGraph
typedef UndirectedGraphBase<ChildGraph, NODE_ITER, EDGE_ITER, ADJACENCY_ITER> Self

Public Functions

NodeIterRange<ChildGraph> nodes() const
EdgeIterRange<ChildGraph> edges() const
template <class TAG>
detail_undirected_graph_base::GraphItemGeneralization<Self, TAG>::type items() const
AdjacencyIterRange<ChildGraph> adjacency(const int64_t node) const
AdjacencyIterRange<ChildGraph> adjacencyIn(const int64_t node) const
AdjacencyIterRange<ChildGraph> adjacencyOut(const int64_t node) const
ADJACENCY_ITER adjacencyOutBegin(const int64_t node) const
ADJACENCY_ITER adjacencyOutEnd(const int64_t node) const
ADJACENCY_ITER adjacencyInBegin(const int64_t node) const
ADJACENCY_ITER adjacencyInEnd(const int64_t node) const
std::pair<int64_t, int64_t> uv(const int64_t edge) const
template <class NODE_LABELS, class EDGE_LABELS>
void nodeLabelsToEdgeLabels(const NODE_LABELS &nodeLabels, EDGE_LABELS &edgeLabels)
template <class F>
void forEachEdge(F &&f) const
template <class F>
void forEachNode(F &&f) const
template <class F, class TAG>
void forEachItem(F &&f) const

Private Functions

ChildGraph &_child()
const ChildGraph &_child() const
template <class EDGE_INTERANL_TYPE, class NODE_INTERNAL_TYPE>
struct UndirectedGraphTypeHelper

Public Types

typedef EDGE_INTERANL_TYPE EdgeInternalType
typedef NODE_INTERNAL_TYPE NodeInteralType
typedef detail_graph::UndirectedAdjacency<int64_t, int64_t, NodeInteralType, EdgeInternalType> NodeAdjacency
typedef nifty::container::FlatSet<NodeAdjacency> NodeStorage
typedef std::pair<NodeInteralType, NodeInteralType> EdgeStorage
typedef boost::counting_iterator<int64_t> NodeIter
typedef boost::counting_iterator<int64_t> EdgeIter
typedef NodeStorage::const_iterator AdjacencyIter
template <std::size_t DIM, bool SIMPLE_NH>
class UndirectedGridGraph
template <std::size_t DIM>
template<>
class UndirectedGridGraph<DIM, true>

Inherits from nifty::graph::UndirectedGraphBase< UndirectedGridGraph< DIM, true >, detail_graph::UndirectedGridGraphIter< DIM, true >::NodeIter, detail_graph::UndirectedGridGraphIter< DIM, true >::EdgeIter, detail_graph::UndirectedGridGraphIter< DIM, true >::AdjacencyIter >

Public Types

typedef nifty::array::StaticArray<int64_t, DIM> ShapeType
typedef nifty::array::StaticArray<int64_t, DIM> CoordinateType
typedef detail_graph::UndirectedGridGraphIter<DIM, true>::NodeIter NodeIter
typedef detail_graph::UndirectedGridGraphIter<DIM, true>::EdgeIter EdgeIter
typedef detail_graph::UndirectedGridGraphIter<DIM, true>::AdjacencyIter AdjacencyIter
typedef ContiguousTag EdgeIdTag
typedef ContiguousTag NodeIdTag
typedef SortedTag EdgeIdOrderTag
typedef SortedTag NodeIdOrderTag

Public Functions

UndirectedGridGraph()
template <class T>
UndirectedGridGraph(const nifty::array::StaticArray<T, DIM> &shape)
template <class T>
void assign(const nifty::array::StaticArray<T, DIM> &shape)
int64_t u(const int64_t e) const
int64_t v(const int64_t e) const
int64_t findEdge(const int64_t u, const int64_t v) const
int64_t nodeIdUpperBound() const
int64_t edgeIdUpperBound() const
uint64_t numberOfEdges() const
uint64_t numberOfNodes() const
NodeIter nodesBegin() const
NodeIter nodesEnd() const
EdgeIter edgesBegin() const
EdgeIter edgesEnd() const
AdjacencyIter adjacencyBegin(const int64_t node) const
AdjacencyIter adjacencyEnd(const int64_t node) const
AdjacencyIter adjacencyOutBegin(const int64_t node) const
AdjacencyIter adjacencyOutEnd(const int64_t node) const
template <class F>
void forEachEdge(F &&f) const
template <class F>
void forEachNode(F &&f) const
uint64_t serializationSize() const
template <class ITER>
void serialize(ITER iter) const
template <class ITER>
void deserialize(ITER iter)
template <class IMAGE, class BINARY_FUNCTOR, class EDGE_MAP>
void imageToEdgeMap(const IMAGE &image, BINARY_FUNCTOR binaryFunctor, EDGE_MAP &edgeMap) const
template <class IMAGE, class EDGE_MAP>
void imageToInterpixelEdgeMap(const IMAGE &image, EDGE_MAP &edgeMap) const
uint64_t shape(const std::size_t d) const
CoordinateType nodeToCoordinate(const uint64_t node) const
template <class NODE_COORDINATE>
void nodeToCoordinate(const uint64_t node, NODE_COORDINATE &coordinate) const
template <class NODE_COORDINATE>
uint64_t coordianteToNode(const NODE_COORDINATE &coordinate) const

Private Types

typedef andres::graph::GridGraph<DIM> AndresGridGraphType
typedef AndresGridGraphType::VertexCoordinate AndresVertexCoordinate

Private Members

andres::graph::GridGraph<DIM> gridGraph_
template <std::size_t DIM, bool SIMPLE_NH>
class UndirectedGridGraphIter

Public Types

typedef andres::graph::GridGraph<DIM> AGridGraph
typedef AGridGraph::AdjacencyIterator AGridGraphAdjacencyIter
typedef UndirectedAdjacency<int64_t, int64_t, int64_t, int64_t> NodeAdjacency
typedef boost::transform_iterator<UnaryFunction, typename AGridGraph::AdjacencyIterator, NodeAdjacency, NodeAdjacency> OldAdjacencyIter
template <std::size_t DIM>
class UndirectedLongRangeGridGraph

Inherits from nifty::graph::UndirectedGraph<>

Public Types

typedef array::StaticArray<int64_t, DIM> ShapeType
typedef array::StaticArray<int64_t, DIM> StridesType
typedef array::StaticArray<int64_t, DIM> CoordinateType
typedef array::StaticArray<int64_t, DIM> OffsetType
typedef std::vector<OffsetType> OffsetVector

Public Functions

UndirectedLongRangeGridGraph(const ShapeType &shape, const OffsetVector &offsets)
auto edgeOffsetIndex() const
template <class D>
auto nodeFeatureDiffereces(const xt::xexpression<D> &nodeFeaturesExpression) const
template <class D>
auto nodeFeatureDiffereces2(const xt::xexpression<D> &nodeFeaturesExpression) const
template <class D>
auto edgeValues(const xt::xexpression<D> &valuesExpression) const
template <class NODE_COORDINATE>
uint64_t coordianteToNode(const NODE_COORDINATE &coordinate) const
const auto &shape() const
const auto &offsets() const

Private Types

typedef detail_graph::UndirectedLongRangeGridGraphAssign<DIM> HelperType

Private Members

ShapeType shape_
StridesType strides_
OffsetVector offsets_
struct UnsortedTag
template <class T = double>
class VariationOfInformation

Public Types

typedef T value_type

Public Functions

template <class ITERATOR_TRUTH, class ITERATOR_PRED>
VariationOfInformation(ITERATOR_TRUTH begin0, ITERATOR_TRUTH end0, ITERATOR_PRED begin1, bool ignoreDefaultLabel = false)
value_type value() const
value_type valueFalseCut() const
value_type valueFalseJoin() const

Private Members

value_type value_
value_type precision_
value_type recall_
class VerboseTimer

Inherits from nifty::tools::Timer

Public Functions

VerboseTimer(const bool verbose = true, const std::string name = std::string())
void startAndPrint(const std::string name = std::string())
VerboseTimer &stopAndPrint()

Private Members

bool verbose_
std::string name_
template <class SOLVER>
class VerboseVisitor

Inherits from nifty::graph::opt::common::VisitorBase< SOLVER >

Public Types

typedef SOLVER SolverType
typedef nifty::tools::Timer TimerType

Public Functions

VerboseVisitor(const int printNth = 1, const double timeLimitSolver = std::numeric_limits< double >::infinity(), const double timeLimitTotal = std::numeric_limits< double >::infinity(), const nifty::logging::LogLevel logLevel = nifty::logging::LogLevel::WARN)
virtual void begin(SolverType *)
virtual bool visit(SolverType *solver)
virtual void end(SolverType *)
virtual void clearLogNames()
virtual void addLogNames(std::initializer_list<std::string> logNames)
virtual void setLogValue(const std::size_t logIndex, double logValue)
virtual void printLog(const nifty::logging::LogLevel logLevel, const std::string &logString)
void stopOptimize()
double runtimeSolver() const
double runtimeTotal() const
double timeLimitTotal() const
double timeLimitSolver() const

Private Functions

void checkRuntime()

Private Members

bool runOpt_
int printNth_
int iter_
double timeLimitTotal_
double timeLimitSolver_
double runtimeSolver_
double runtimeTotal_
nifty::logging::LogLevel logLevel_
TimerType timerSolver_
TimerType timerTotal_
std::vector<std::string> logNames_
std::vector<double> logValues_
template <class T, bool isConst, class A>
class View

Inherits from andres::ViewExpression< View< T, isConst, A >, T >

Public Types

typedef std::size_t size_type
typedef T value_type
typedef marray_detail::IfBool<isConst, const T *, T *>::type pointer
typedef const T *const_pointer
typedef marray_detail::IfBool<isConst, const T&, T&>::type reference
typedef const T &const_reference
typedef Iterator<T, isConst, A> iterator
typedef Iterator<T, true, A> const_iterator
typedef std::reverse_iterator<iterator> reverse_iterator
typedef std::reverse_iterator<const_iterator> const_reverse_iterator
typedef ViewExpression<View<T, isConst, A>, T> base
typedef A::template rebind<value_type>::other andres::View::allocator_type

Public Functions

View(const allocator_type &allocator = allocator_type ())
View(pointer data, const allocator_type &allocator = allocator_type ())
View(const View<T, false, A> &in)
template <class ShapeIterator>
View(ShapeIterator begin, ShapeIterator end, pointer data, const CoordinateOrder &externalCoordinateOrder = defaultOrder, const CoordinateOrder &internalCoordinateOrder = defaultOrder, const allocator_type &allocator = allocator_type ())
template <class ShapeIterator, class StrideIterator>
View(ShapeIterator begin, ShapeIterator end, StrideIterator it, pointer data, const CoordinateOrder &internalCoordinateOrder, const allocator_type &allocator = allocator_type ())
View<T, isConst, A> &operator=(const T &value)
View<T, isConst, A> &operator=(const View<T, true, A> &in)
View<T, isConst, A> &operator=(const View<T, false, A> &in)
template <class TLocal, bool isConstLocal, class ALocal>
View<T, isConst, A> &operator=(const View<TLocal, isConstLocal, ALocal> &in)
template <class E, class Te>
View<T, isConst, A> &operator=(const ViewExpression<E, Te> &expression)
void assign(const allocator_type &allocator = allocator_type ())
template <class ShapeIterator>
void assign(ShapeIterator begin, ShapeIterator end, pointer data, const CoordinateOrder &externalCoordinateOrder = defaultOrder, const CoordinateOrder &internalCoordinateOrder = defaultOrder, const allocator_type &allocator = allocator_type ())
template <class ShapeIterator, class StrideIterator>
void assign(ShapeIterator begin, ShapeIterator end, StrideIterator it, pointer data, const CoordinateOrder &internalCoordinateOrder, const allocator_type &allocator = allocator_type ())
const std::size_t dimension() const
const std::size_t size() const
const std::size_t shape(const std::size_t dimension) const
const std::size_t *shapeBegin() const
const std::size_t *shapeEnd() const
const std::size_t strides(const std::size_t dimension) const
const std::size_t *stridesBegin() const
const std::size_t *stridesEnd() const
const CoordinateOrder &coordinateOrder() const
const bool isSimple() const
template <class TLocal, bool isConstLocal, class ALocal>
bool overlaps(const View<TLocal, isConstLocal, ALocal> &v) const
template <class U>
View<T, isConst, A>::reference operator()(U u)
template <class U>
View<T, isConst, A>::reference operator()(U u) const
View<T, isConst, A>::reference operator()(const std::size_t c0, const std::size_t c1)
View<T, isConst, A>::reference operator()(const std::size_t c0, const std::size_t c1) const
View<T, isConst, A>::reference operator()(const std::size_t c0, const std::size_t c1, const std::size_t c2)
View<T, isConst, A>::reference operator()(const std::size_t c0, const std::size_t c1, const std::size_t c2) const
View<T, isConst, A>::reference operator()(const std::size_t c0, const std::size_t c1, const std::size_t c2, const std::size_t c3)
View<T, isConst, A>::reference operator()(const std::size_t c0, const std::size_t c1, const std::size_t c2, const std::size_t c3) const
View<T, isConst, A>::reference operator()(const std::size_t c0, const std::size_t c1, const std::size_t c2, const std::size_t c3, const std::size_t c4)
View<T, isConst, A>::reference operator()(const std::size_t c0, const std::size_t c1, const std::size_t c2, const std::size_t c3, const std::size_t c4) const
View<T, isConst, A>::reference operator()(const std::size_t c0, const std::size_t c1, const std::size_t c2, const std::size_t c3, const std::size_t c4, const std::size_t c5, const std::size_t c6, const std::size_t c7, const std::size_t c8, const std::size_t c9)
View<T, isConst, A>::reference operator()(const std::size_t c0, const std::size_t c1, const std::size_t c2, const std::size_t c3, const std::size_t c4, const std::size_t c5, const std::size_t c6, const std::size_t c7, const std::size_t c8, const std::size_t c9) const
template <class BaseIterator, class ShapeIterator>
void view(BaseIterator bit, ShapeIterator sit, View<T, isConst, A> &out) const
template <class BaseIterator, class ShapeIterator>
void view(BaseIterator bit, ShapeIterator sit, const CoordinateOrder &internalCoordinateOrder, View<T, isConst, A> &out) const
template <class BaseIterator, class ShapeIterator>
View<T, isConst, A> view(BaseIterator bit, ShapeIterator sit) const
template <class BaseIterator, class ShapeIterator>
View<T, isConst, A> view(BaseIterator bit, ShapeIterator sit, const CoordinateOrder &internalCoordinateOrder) const
template <class BaseIterator, class ShapeIterator>
void constView(BaseIterator bit, ShapeIterator sit, View<T, true, A> &out) const
template <class BaseIterator, class ShapeIterator>
void constView(BaseIterator bit, ShapeIterator sit, const CoordinateOrder &internalCoordinateOrder, View<T, true, A> &out) const
template <class BaseIterator, class ShapeIterator>
View<T, true, A> constView(BaseIterator bit, ShapeIterator sit) const
template <class BaseIterator, class ShapeIterator>
View<T, true, A> constView(BaseIterator bit, ShapeIterator sit, const CoordinateOrder &internalCoordinateOrder) const
View<T, isConst, A>::iterator begin()
View<T, isConst, A>::iterator end()
View<T, isConst, A>::const_iterator begin() const
View<T, isConst, A>::const_iterator end() const
View<T, isConst, A>::reverse_iterator rbegin()
View<T, isConst, A>::reverse_iterator rend()
View<T, isConst, A>::const_reverse_iterator rbegin() const
View<T, isConst, A>::const_reverse_iterator rend() const
template <class ShapeIterator>
void reshape(ShapeIterator begin, ShapeIterator end)
template <class CoordinateIterator>
void permute(CoordinateIterator begin)
void transpose(const std::size_t c1, const std::size_t c2)
void transpose()
void shift(const int n)
void squeeze()
template <class ShapeIterator>
View<T, isConst, A> reshapedView(ShapeIterator begin, ShapeIterator end) const
template <class CoordinateIterator>
View<T, isConst, A> permutedView(CoordinateIterator begin) const
View<T, isConst, A> transposedView(const std::size_t c1, const std::size_t c2) const
View<T, isConst, A> transposedView() const
View<T, isConst, A> shiftedView(const int n) const
View<T, isConst, A> boundView(const std::size_t dimension, const std::size_t value = 0) const
View<T, isConst, A> squeezedView() const
template <class CoordinateIterator>
void coordinatesToIndex(CoordinateIterator it, std::size_t &out) const
template <class CoordinateIterator>
void coordinatesToOffset(CoordinateIterator it, std::size_t &out) const
template <class CoordinateIterator>
void indexToCoordinates(std::size_t index, CoordinateIterator outit) const
void indexToOffset(std::size_t index, std::size_t &out) const
std::string asString(const StringStyle &style = MatrixStyle) const

Private Types

typedef marray_detail::Geometry<A> geometry_type

Private Functions

View(pointer data, const geometry_type &geometry)
void updateSimplicity()
void testInvariant() const
const T &operator[](const std::size_t offset) const
T &operator[](const std::size_t offset)

Private Members

pointer data_
geometry_type geometry_

Friends

friend andres::View::View
friend andres::View::Marray
template <class E, class T>
class ViewExpression

Public Types

typedef E expression_type
typedef T value_type

Public Functions

const std::size_t dimension() const
const std::size_t size() const
const std::size_t shape(const std::size_t j) const
const std::size_t *shapeBegin() const
const std::size_t *shapeEnd() const
template <class Tv, bool isConst, class A>
bool overlaps(const View<Tv, isConst, A> &v) const
const CoordinateOrder &coordinateOrder() const
const bool isSimple() const
template <class Accessor>
const T &operator()(Accessor it) const
const T &operator()(const std::size_t c0, const std::size_t c1) const
const T &operator()(const std::size_t c0, const std::size_t c1, const std::size_t c2) const
const T &operator()(const std::size_t c0, const std::size_t c1, const std::size_t c2, const std::size_t c3) const
const T &operator()(const std::size_t c0, const std::size_t c1, const std::size_t c2, const std::size_t c3, const std::size_t c4) const
const T &operator[](const std::size_t offset) const
template<>
operator E&()
operator E const&() const
template <class SOLVER>
class VisitorBase

Subclassed by nifty::graph::opt::common::EmptyVisitor< SOLVER >, nifty::graph::opt::common::LoggingVisitor< SOLVER >, nifty::graph::opt::common::VerboseVisitor< SOLVER >, nifty::graph::opt::lifted_multicut::PyLiftedMulticutVisitorBase< OBJECTIVE >, nifty::graph::opt::mincut::PyMincutVisitorBase< OBJECTIVE >, nifty::graph::opt::minstcut::PyMinstcutVisitorBase< OBJECTIVE >, nifty::graph::opt::multicut::PyMulticutVisitorBase< OBJECTIVE >, nifty::graph::opt::multicut::PyMulticutVisitorBase< OBJECTIVE >

Public Types

typedef SOLVER SolverType

Public Functions

virtual void begin(SolverType *solver) = 0
virtual bool visit(SolverType *solver) = 0
virtual void end(SolverType *solver) = 0
virtual void clearLogNames()
virtual void addLogNames(std::initializer_list<std::string> logNames)
virtual void setLogValue(const std::size_t logIndex, double logValue)
virtual void printLog(const nifty::logging::LogLevel logLevel, const std::string &logString)
template <class SOLVER>
class VisitorProxy

Public Types

typedef SOLVER SolverType
typedef VisitorBase<SOLVER> VisitorBaseTpe

Public Functions

VisitorProxy(VisitorBaseTpe *visitor)
void addLogNames(std::initializer_list<std::string> logNames)
void begin(SolverType *solver)
bool visit(SolverType *solver)
void end(SolverType *solver)
void clearLogNames()
void setLogValue(const std::size_t logIndex, const double logValue)
void printLog(const nifty::logging::LogLevel logLevel, const std::string &logString)
operator bool() const

Private Members

VisitorBaseTpe *visitor_
template <class OBJECTIVE>
class WatershedProposalGenerator

Inherits from nifty::graph::opt::common::ProposalGeneratorBase< OBJECTIVE >

Public Types

typedef OBJECTIVE ObjectiveType
typedef ObjectiveType::GraphType GraphType
typedef GraphType:: template NodeMap<uint64_t> nifty::graph::opt::common::WatershedProposalGenerator::ProposalType
typedef GraphType:: template EdgeMap<float> nifty::graph::opt::common::WatershedProposalGenerator::EdgeWeights

Public Functions

WatershedProposalGenerator(const ObjectiveType &objective, const size_t numberOfThreads, const SettingsType &settings = SettingsType ())
void reset()
virtual ~WatershedProposalGenerator()
virtual void generateProposal(const ProposalType &currentBest, ProposalType &proposal, const size_t tid)

Private Members

const ObjectiveType &objective_
size_t numberOfThreads_
SettingsType settings_
std::vector<uint64_t> negativeEdges_
EdgeWeights noisyEdgeWeights_
ProposalType seeds_
std::vector<std::mt19937> gens_
std::normal_distribution dist_
std::uniform_int_distribution intDist_
template <class OBJECTIVE>
class WatershedProposalGenerator

Inherits from nifty::graph::opt::lifted_multicut::ProposalGeneratorBase< OBJECTIVE >

Public Types

typedef OBJECTIVE ObjectiveType
typedef LiftedMulticutBase<ObjectiveType> LiftedMulticutBaseType
typedef ObjectiveType::GraphType GraphType
typedef ObjectiveType::LiftedGraphType LiftedGraphType
typedef LiftedMulticutBaseType::NodeLabelsType NodeLabelsType
typedef GraphType:: template EdgeMap<float> nifty::graph::opt::lifted_multicut::WatershedProposalGenerator::EdgeWeights

Public Functions

WatershedProposalGenerator(const ObjectiveType &objective, const size_t numberOfThreads, const SettingsType &settings = SettingsType ())
void reset()
virtual ~WatershedProposalGenerator()
virtual void generateProposal(const NodeLabelsType &currentBest, NodeLabelsType &proposal, const size_t tid)

Private Members

const ObjectiveType &objective_
size_t numberOfThreads_
SettingsType settings_
std::vector<uint64_t> negativeEdges_
EdgeWeights graphEdgeWeights_
std::vector<std::mt19937> gens_
std::normal_distribution dist_
std::uniform_int_distribution intDist_
template <class OBJECTIVE>
class WatershedProposals

Public Types

typedef OBJECTIVE ObjectiveType
typedef ObjectiveType::GraphType GraphType
typedef MulticutBase<ObjectiveType> Base
typedef MulticutGreedyAdditive<ObjectiveType> Solver
typedef Solver::SettingsType SolverSettings
typedef Base::NodeLabelsType NodeLabelsType
typedef GraphType:: template EdgeMap<double> nifty::graph::opt::multicut::WatershedProposals::EdgeWeights

Public Functions

WatershedProposals(const ObjectiveType &objective, const SettingsType &settings, const size_t threadIndex)
~WatershedProposals()
void generate(const NodeLabelsType &currentBest, NodeLabelsType &proposal)
void reset()

Public Static Functions

static std::string name()

Private Members

const ObjectiveType &objective_
const GraphType graph_
EdgeWeights weights_
NodeLabelsType seeds_
std::vector<uint64_t> negativeEdges_
SettingsType settings_
size_t threadIndex_
size_t proposalNumber_
std::mt19937 gen_
std::normal_distribution dist_
std::uniform_int_distribution intDist_
class WeightsChangedNotSupported

Inherits from runtime_error

Public Functions

WeightsChangedNotSupported(const std::string msg = std::string())
namespace andres

Enums

enum StringStyle

Values:

TableStyle
MatrixStyle
enum CoordinateOrder

Values:

FirstMajorOrder
LastMajorOrder

Functions

template <class T1, class T2, bool isConst, class A>
View<T1, false, A> &operator+=(View<T1, false, A> &v, const View<T2, isConst, A> &w)
template <class T, class A>
View<T, false, A> &operator++(View<T, false, A> &v)
template <class T, class A>
Marray<T, A> operator++(Marray<T, A> &in, int dummy)
template <class T1, class T2, bool isConst, class A>
View<T1, false, A> &operator-=(View<T1, false, A> &v, const View<T2, isConst, A> &w)
template <class T, class A>
View<T, false, A> &operator--(View<T, false, A> &v)
template <class T, class A>
Marray<T, A> operator--(Marray<T, A> &in, int dummy)
template <class T1, class T2, bool isConst, class A>
View<T1, false, A> &operator*=(View<T1, false, A> &v, const View<T2, isConst, A> &w)
template <class T1, class T2, bool isConst, class A>
View<T1, false, A> &operator/=(View<T1, false, A> &v, const View<T2, isConst, A> &w)
template <class E1, class T1, class E2, class T2>
const BinaryViewExpression<E1, T1, E2, T2, marray_detail::Plus<T1, T2, typename marray_detail::PromoteType<T1, T2>::type>> operator+(const ViewExpression<E1, T1> &expression1, const ViewExpression<E2, T2> &expression2)
template <class E, class T>
const ViewExpression<E, T> &operator+(const ViewExpression<E, T> &expression)
template <class E1, class T1, class E2, class T2>
const BinaryViewExpression<E1, T1, E2, T2, marray_detail::Minus<T1, T2, typename marray_detail::PromoteType<T1, T2>::type>> operator-(const ViewExpression<E1, T1> &expression1, const ViewExpression<E2, T2> &expression2)
template <class E, class T>
const UnaryViewExpression<E, T, marray_detail::Negate<T>> operator-(const ViewExpression<E, T> &expression)
template <class E1, class T1, class E2, class T2>
const BinaryViewExpression<E1, T1, E2, T2, marray_detail::Times<T1, T2, typename marray_detail::PromoteType<T1, T2>::type>> operator*(const ViewExpression<E1, T1> &expression1, const ViewExpression<E2, T2> &expression2)
template <class E1, class T1, class E2, class T2>
const BinaryViewExpression<E1, T1, E2, T2, marray_detail::DividedBy<T1, T2, typename marray_detail::PromoteType<T1, T2>::type>> operator/(const ViewExpression<E1, T1> &expression1, const ViewExpression<E2, T2> &expression2)

Variables

const bool Const = true
const bool Mutable = false
const CoordinateOrder defaultOrder = FirstMajorOrder
const InitializationSkipping SkipInitialization = InitializationSkipping()
const bool MARRAY_NO_DEBUG = true
const bool MARRAY_NO_ARG_TEST = true
namespace hdf5

Enums

enum FileAccessMode

Values:

READ_ONLY
READ_WRITE
enum HDF5Version

Values:

DEFAULT_HDF5_VERSION
LATEST_HDF5_VERSION

Functions

hid_t createFile(const std::string &filename, HDF5Version hdf5version = DEFAULT_HDF5_VERSION)
hid_t openFile(const std::string &filename, FileAccessMode fileAccessMode = READ_ONLY, HDF5Version hdf5version = DEFAULT_HDF5_VERSION)
void closeFile(const hid_t &handle)
hid_t createGroup(const hid_t &parentHandle, const std::string &groupName)
hid_t openGroup(const hid_t &parentHandle, const std::string &groupName)
void closeGroup(const hid_t &handle)
template <class T>
void save(const hid_t &groupHandle, const std::string &datasetName, const Marray<T> &in)
template <class T, bool isConst>
void save(const hid_t &groupHandle, const std::string &datasetName, const View<T, isConst> &in)
template <class T>
void save(const hid_t &groupHandle, const std::string &datasetName, const std::vector<T> &in)
template <class T, class BaseIterator, class ShapeIterator>
void saveHyperslab(const hid_t &groupHandle, const std::string &datasetName, BaseIterator baseBegin, BaseIterator baseEnd, ShapeIterator shapeBegin, const Marray<T> &in)
template <class T, class ShapeIterator>
void create(const hid_t &groupHandle, const std::string &datasetName, ShapeIterator begin, ShapeIterator end, CoordinateOrder coordinateOrder)
template <class T>
void load(const hid_t &groupHandle, const std::string &datasetName, Marray<T> &out)
template <class T>
void load(const hid_t &groupHandle, const std::string &datasetName, std::vector<T> &out)
template <class T>
void load(const std::string &filename, const std::string &datasetName, Marray<T> &out, HDF5Version hdf5version = DEFAULT_HDF5_VERSION)
template <class T>
void load(const std::string &filename, const std::string &datasetName, std::vector<T> &out, HDF5Version hdf5version = DEFAULT_HDF5_VERSION)
template <class T>
void loadShape(const hid_t &groupHandle, const std::string &datasetName, std::vector<T> &out)
template <class T, class BaseIterator, class ShapeIterator>
void loadHyperslab(const hid_t &groupHandle, const std::string &datasetName, BaseIterator baseBegin, BaseIterator baseEnd, ShapeIterator shapeBegin, Marray<T> &out)

Variables

const char reverseShapeAttributeName[14] = "reverse-shape"
namespace half_float
namespace detail

Classification helpers

template <typename T>
bool builtin_isinf(T arg)
template <typename T>
bool builtin_isnan(T arg)
template <typename T>
bool builtin_signbit(T arg)

Conversion

template <std::float_round_style R>
uint16 float2half_impl(float value, true_type)
template <std::float_round_style R>
uint16 float2half_impl(double value, true_type)
template <std::float_round_style R, typename T>
uint16 float2half_impl(T value, ...)
template <std::float_round_style R, typename T>
uint16 float2half(T value)
template <std::float_round_style R, bool S, typename T>
uint16 int2half_impl(T value)
template <std::float_round_style R, typename T>
uint16 int2half(T value)
float half2float_impl(uint16 value, float, true_type)
double half2float_impl(uint16 value, double, true_type)
template <typename T>
T half2float_impl(uint16 value, T, ...)
template <typename T>
T half2float(uint16 value)
template <std::float_round_style R, bool E, typename T>
T half2int_impl(uint16 value)
template <std::float_round_style R, typename T>
T half2int(uint16 value)
template <typename T>
T half2int_up(uint16 value)
template <std::float_round_style R, bool E>
uint16 round_half_impl(uint16 value)
template <std::float_round_style R>
uint16 round_half(uint16 value)
uint16 round_half_up(uint16 value)

Comparison operators

template <typename T, typename U>
enable<bool, T, U>::type operator==(T x, U y)
template <typename T, typename U>
enable<bool, T, U>::type operator!=(T x, U y)
template <typename T, typename U>
enable<bool, T, U>::type operator<(T x, U y)
template <typename T, typename U>
enable<bool, T, U>::type operator>(T x, U y)
template <typename T, typename U>
enable<bool, T, U>::type operator<=(T x, U y)
template <typename T, typename U>
enable<bool, T, U>::type operator>=(T x, U y)

Arithmetic operators

template <typename T, typename U>
enable<expr, T, U>::type operator+(T x, U y)
template <typename T, typename U>
enable<expr, T, U>::type operator-(T x, U y)
template <typename T, typename U>
enable<expr, T, U>::type operator*(T x, U y)
template <typename T, typename U>
enable<expr, T, U>::type operator/(T x, U y)
template <typename T>
HALF_CONSTEXPR enable<T,T>::type half_float::detail::operator+(T arg)
template <typename T>
HALF_CONSTEXPR enable<T,T>::type half_float::detail::operator-(T arg)

Input and output

template <typename T, typename charT, typename traits>
enable<std::basic_ostream<charT, traits>&, T>::type operator<<(std::basic_ostream<charT, traits> &out, T arg)
template <typename charT, typename traits>
std::basic_istream<charT, traits> &operator>>(std::basic_istream<charT, traits> &in, half &arg)

Basic mathematical operations

half abs(half arg)
expr abs(expr arg)
half fabs(half arg)
expr fabs(expr arg)
expr fmod(half x, half y)
expr fmod(half x, expr y)
expr fmod(expr x, half y)
expr fmod(expr x, expr y)
expr remainder(half x, half y)
expr remainder(half x, expr y)
expr remainder(expr x, half y)
expr remainder(expr x, expr y)
expr remquo(half x, half y, int *quo)
expr remquo(half x, expr y, int *quo)
expr remquo(expr x, half y, int *quo)
expr remquo(expr x, expr y, int *quo)
expr fma(half x, half y, half z)
expr fma(half x, half y, expr z)
expr fma(half x, expr y, half z)
expr fma(half x, expr y, expr z)
expr fma(expr x, half y, half z)
expr fma(expr x, half y, expr z)
expr fma(expr x, expr y, half z)
expr fma(expr x, expr y, expr z)
half fmax(half x, half y)
expr fmax(half x, expr y)
expr fmax(expr x, half y)
expr fmax(expr x, expr y)
half fmin(half x, half y)
expr fmin(half x, expr y)
expr fmin(expr x, half y)
expr fmin(expr x, expr y)
expr fdim(half x, half y)
expr fdim(half x, expr y)
expr fdim(expr x, half y)
expr fdim(expr x, expr y)
half nanh(const char *)

Exponential functions

expr exp(half arg)
expr exp(expr arg)
expr expm1(half arg)
expr expm1(expr arg)
expr exp2(half arg)
expr exp2(expr arg)
expr log(half arg)
expr log(expr arg)
expr log10(half arg)
expr log10(expr arg)
expr log1p(half arg)
expr log1p(expr arg)
expr log2(half arg)
expr log2(expr arg)

Power functions

expr sqrt(half arg)
expr sqrt(expr arg)
expr cbrt(half arg)
expr cbrt(expr arg)
expr hypot(half x, half y)
expr hypot(half x, expr y)
expr hypot(expr x, half y)
expr hypot(expr x, expr y)
expr pow(half base, half exp)
expr pow(half base, expr exp)
expr pow(expr base, half exp)
expr pow(expr base, expr exp)

Trigonometric functions

expr sin(half arg)
expr sin(expr arg)
expr cos(half arg)
expr cos(expr arg)
expr tan(half arg)
expr tan(expr arg)
expr asin(half arg)
expr asin(expr arg)
expr acos(half arg)
expr acos(expr arg)
expr atan(half arg)
expr atan(expr arg)
expr atan2(half x, half y)
expr atan2(half x, expr y)
expr atan2(expr x, half y)
expr atan2(expr x, expr y)

Hyperbolic functions

expr sinh(half arg)
expr sinh(expr arg)
expr cosh(half arg)
expr cosh(expr arg)
expr tanh(half arg)
expr tanh(expr arg)
expr asinh(half arg)
expr asinh(expr arg)
expr acosh(half arg)
expr acosh(expr arg)
expr atanh(half arg)
expr atanh(expr arg)

Error and gamma functions

expr erf(half arg)
expr erf(expr arg)
expr erfc(half arg)
expr erfc(expr arg)
expr lgamma(half arg)
expr lgamma(expr arg)
expr tgamma(half arg)
expr tgamma(expr arg)

Rounding

half ceil(half arg)
half ceil(expr arg)
half floor(half arg)
half floor(expr arg)
half trunc(half arg)
half trunc(expr arg)
half round(half arg)
half round(expr arg)
long lround(half arg)
long lround(expr arg)
half nearbyint(half arg)
half nearbyint(expr arg)
half rint(half arg)
half rint(expr arg)
long lrint(half arg)
long lrint(expr arg)

Floating point manipulation

half frexp(half arg, int *exp)
half frexp(expr arg, int *exp)
half ldexp(half arg, int exp)
half ldexp(expr arg, int exp)
half modf(half arg, half *iptr)
half modf(expr arg, half *iptr)
half scalbn(half arg, int exp)
half scalbn(expr arg, int exp)
half scalbln(half arg, long exp)
half scalbln(expr arg, long exp)
int ilogb(half arg)
int ilogb(expr arg)
half logb(half arg)
half logb(expr arg)
half nextafter(half from, half to)
half nextafter(half from, expr to)
half nextafter(expr from, half to)
half nextafter(expr from, expr to)
half nexttoward(half from, long double to)
half nexttoward(expr from, long double to)
half copysign(half x, half y)
half copysign(half x, expr y)
half copysign(expr x, half y)
half copysign(expr x, expr y)

Floating point classification

int fpclassify(half arg)
int fpclassify(expr arg)
bool isfinite(half arg)
bool isfinite(expr arg)
bool isinf(half arg)
bool isinf(expr arg)
bool isnan(half arg)
bool isnan(expr arg)
bool isnormal(half arg)
bool isnormal(expr arg)
bool signbit(half arg)
bool signbit(expr arg)

Comparison

bool isgreater(half x, half y)
bool isgreater(half x, expr y)
bool isgreater(expr x, half y)
bool isgreater(expr x, expr y)
bool isgreaterequal(half x, half y)
bool isgreaterequal(half x, expr y)
bool isgreaterequal(expr x, half y)
bool isgreaterequal(expr x, expr y)
bool isless(half x, half y)
bool isless(half x, expr y)
bool isless(expr x, half y)
bool isless(expr x, expr y)
bool islessequal(half x, half y)
bool islessequal(half x, expr y)
bool islessequal(expr x, half y)
bool islessequal(expr x, expr y)
bool islessgreater(half x, half y)
bool islessgreater(half x, expr y)
bool islessgreater(expr x, half y)
bool islessgreater(expr x, expr y)
bool isunordered(half x, half y)
bool isunordered(half x, expr y)
bool isunordered(expr x, half y)
bool isunordered(expr x, expr y)

Casting

template <typename T, typename U>
T half_cast(U arg)
template <typename T, std::float_round_style R, typename U>
T half_cast(U arg)

Typedefs

typedef bool_type<true> true_type
typedef bool_type<false> false_type
typedef unsigned short uint16

Variables

HALF_CONSTEXPR_CONST binary_t half_float::detail::binary = binary_t()
namespace hdf5
namespace nifty

Typedefs

typedef half_float::half float16_t
typedef float float32_t
typedef half_float::half float64_t

Functions

std::string lowerFirst(const std::string &name)
template <typename VALUE_TYPE, size_t DIM, bool AUTO_CAST_TYPE>
std::ostream &operator<<(std::ostream &os, const nifty::marray::PyView<VALUE_TYPE, DIM, AUTO_CAST_TYPE> &obj)
namespace array

Typedefs

using nifty::array::StaticArray = typedef ArrayExtender< StaticArrayBase<T,SIZE> >
using nifty::array::Vector = typedef ArrayExtender< std::vector<T,ALLOCATOR> >

Functions

template <class STREAM, class ARRAY_CLASS>
STREAM &operator<<(STREAM &out, const ArrayExtender<ARRAY_CLASS> &array)
nifty::array::NIFTY_MACRO_BINARY_OP_INPLACE(+)
nifty::array::NIFTY_MACRO_BINARY_OP_INPLACE(-)
NIFTY_MACRO_BINARY_OP_INPLACE* nifty::array::NIFTY_MACRO_BINARY_OP_INPLACE(/)
nifty::array::NIFTY_MACRO_BINARY_OP_INPLACE(|)
nifty::array::NIFTY_MACRO_BINARY_OP(+, +)
nifty::array::NIFTY_MACRO_BINARY_OP(-, -)
NIFTY_MACRO_BINARY_OP* nifty::array::NIFTY_MACRO_BINARY_OP(/, /)
nifty::array::NIFTY_MACRO_BINARY_OP(|, |)
namespace cgp

Functions

template <T>
void cell1ProbabilityPropagation2D(const nifty::marray::View<T> &probabilitiesIn, const CellBoundsVector<2, 0> &cell0Bounds, const CellBoundedByVector<2, 1> &cell1BoundedBy, nifty::marray::View<T> &probabilitiesOut, const float thresholdLow = 0.3, const float thresholdHigh = 0.5, const float damping = 0.1)
namespace container

Typedefs

using nifty::container::BoostFlatMap = typedef __nifty_mapimpl__<KEY, VALUE>
using nifty::container::BoostFlatSet = typedef __nifty_setimpl__<T>
namespace exceptions
namespace features

Variables

std::once_flag onceFlag
namespace detail_fastfilters

Functions

template <typename fastfilters_array_t>
void convertMarray2ff(const marray::View<float> &array, fastfilters_array_t &ff)
namespace filters
namespace graph

Typedefs

using nifty::graph::BreadthFirstSearch = typedef detail_graph::SearchImpl<GRAPH, detail_graph::FiFo<int64_t> >
using nifty::graph::DepthFirstSearch = typedef detail_graph::SearchImpl<GRAPH, detail_graph::LiFo<int64_t> >
using nifty::graph::ExplicitLabelsGridRag = typedef GridRag<DIM, ExplicitLabels<DIM, LABEL_TYPE> >
using nifty::graph::PyContractionGraph = typedef EdgeContractionGraphWithSets< BASE_GRAPH, FlexibleCallback, std::set<uint64_t> >
typedef UndirectedGraph PyUndirectedGraph

Functions

template <class GRAPH, class EDGE_WEIGHTS, class SEEDS, class LABELS>
void edgeWeightedWatershedsSegmentation(const GRAPH &g, const EDGE_WEIGHTS &edgeWeights, const SEEDS &seeds, LABELS &labels)
template <class GRAPH, class EDGE_WEIGHTS, class SEEDS, class LABELS>
void carvingSegmentation(const GRAPH &g, const EDGE_WEIGHTS &edgeWeights, const SEEDS &seeds, const typename LABELS::value_type backgroundLabel, const typename EDGE_WEIGHTS::value_type backgroundBias, const typename EDGE_WEIGHTS::value_type noPriorBelow, LABELS &labels)
template <class GRAPH, class NODE_WEIGHTS, class SEEDS, class LABELS>
void nodeWeightedWatershedsSegmentation(const GRAPH &g, const NODE_WEIGHTS &nodeWeights, const SEEDS &seeds, LABELS &labels)
template <class GRAPH, class ITERATOR>
int64_t findChord(const GRAPH &graph, ITERATOR begin, ITERATOR end, const bool ignoreEdgeBetweenFirstAndLast = false)
template <class GRAPH, class SUBGRAPH_MASK, class ITERATOR>
int64_t findChord(const GRAPH &graph, const SUBGRAPH_MASK &mask, ITERATOR begin, ITERATOR end, const bool ignoreEdgeBetweenFirstAndLast = false)
template <class PREDECESSORS_MAP, class OUT_ITER>
size_t buildPathInLargeEnoughBuffer(const uint64_t source, const uint64_t target, const PREDECESSORS_MAP &predecessorMap, OUT_ITER largeEnoughBufferBegin)
template <class GRAPH, class CUT_PROBS, class CUT_PROBS_OUT>
void edgeWeightedWatershedsSegmentationImpl(const GRAPH &g, const CUT_PROBS &cutProbs, CUT_PROBS_OUT &cutProbsOut)
template <class COORD>
COORD makeCoord2(const COORD &coord, const size_t axis)
template <class T, class U>
T replaceIfNotFinite(const T &val, const U &replaceVal)
template <class EDGE_ACC_CHAIN, std::size_t DIM, class LABELS_PROXY, class DATA, class F>
void accumulateEdgeFeaturesWithAccChain(const GridRag<DIM, LABELS_PROXY> &rag, const DATA &data, const array::StaticArray<int64_t, DIM> &blockShape, const parallel::ParallelOptions &pOpts, parallel::ThreadPool &threadpool, F &&f, const AccOptions &accOptions = AccOptions ())
template <class EDGE_ACC_CHAIN, class NODE_ACC_CHAIN, std::size_t DIM, class LABELS_PROXY, class DATA, class F>
void accumulateEdgeAndNodeFeaturesWithAccChainSaveMemory(const GridRag<DIM, LABELS_PROXY> &rag, const DATA &data, const array::StaticArray<int64_t, DIM> &blockShape, const parallel::ParallelOptions &pOpts, parallel::ThreadPool &threadpool, F &&f, const AccOptions &accOptions = AccOptions ())
template <class EDGE_ACC_CHAIN, class NODE_ACC_CHAIN, std::size_t DIM, class LABELS_PROXY, class DATA, class F>
void accumulateEdgeAndNodeFeaturesWithAccChain(const GridRag<DIM, LABELS_PROXY> &rag, const DATA &data, const array::StaticArray<int64_t, DIM> &blockShape, const parallel::ParallelOptions &pOpts, parallel::ThreadPool &threadpool, F &&f, const AccOptions &accOptions = AccOptions ())
template <class EDGE_ACC_CHAIN, class NODE_ACC_CHAIN, std::size_t DIM, class LABELS_PROXY, class F>
void accumulateEdgeAndNodeFeaturesWithAccChain(const GridRag<DIM, LABELS_PROXY> &rag, const array::StaticArray<int64_t, DIM> &blockShape, const parallel::ParallelOptions &pOpts, parallel::ThreadPool &threadpool, F &&f)
template <class NODE_ACC_CHAIN, std::size_t DIM, class LABELS_PROXY, class DATA, class F>
void accumulateNodeFeaturesWithAccChain(const GridRag<DIM, LABELS_PROXY> &rag, const DATA &data, const array::StaticArray<int64_t, DIM> &blockShape, const parallel::ParallelOptions &pOpts, parallel::ThreadPool &threadpool, F &&f, const AccOptions &accOptions = AccOptions ())
template <class NODE_ACC_CHAIN, std::size_t DIM, class LABELS_PROXY, class F>
void accumulateNodeFeaturesWithAccChain(const GridRag<DIM, LABELS_PROXY> &rag, const array::StaticArray<int64_t, DIM> &blockShape, const parallel::ParallelOptions &pOpts, parallel::ThreadPool &threadpool, F &&f)
template <std::size_t DIM, class LABELS_PROXY, class DATA, class FEATURE_TYPE>
void accumulateMeanAndLength(const GridRag<DIM, LABELS_PROXY> &rag, const DATA &data, const array::StaticArray<int64_t, DIM> &blockShape, marray::View<FEATURE_TYPE> &edgeFeaturesOut, marray::View<FEATURE_TYPE> &nodeFeaturesOut, const int numberOfThreads = -1, const bool saveMemory = false)
template <std::size_t DIM, class LABELS_PROXY, class DATA, class FEATURE_TYPE>
void accumulateEdgeMeanAndLength(const GridRag<DIM, LABELS_PROXY> &rag, const DATA &data, const array::StaticArray<int64_t, DIM> &blockShape, marray::View<FEATURE_TYPE> &out, const int numberOfThreads = -1)
template <std::size_t DIM, class LABELS_PROXY, class DATA, class FEATURE_TYPE>
void accumulateStandartFeatures(const GridRag<DIM, LABELS_PROXY> &rag, const DATA &data, const double minVal, const double maxVal, const array::StaticArray<int64_t, DIM> &blockShape, marray::View<FEATURE_TYPE> &edgeFeaturesOut, marray::View<FEATURE_TYPE> &nodeFeaturesOut, const int numberOfThreads = -1)
template <std::size_t DIM, class LABELS_PROXY, class DATA, class FEATURE_TYPE>
void accumulateEdgeStandartFeatures(const GridRag<DIM, LABELS_PROXY> &rag, const DATA &data, const double minVal, const double maxVal, const array::StaticArray<int64_t, DIM> &blockShape, marray::View<FEATURE_TYPE> &edgeFeaturesOut, const int numberOfThreads = -1)
template <std::size_t DIM, class LABELS_PROXY, class DATA, class FEATURE_TYPE>
void accumulateNodeStandartFeatures(const GridRag<DIM, LABELS_PROXY> &rag, const DATA &data, const double minVal, const double maxVal, const array::StaticArray<int64_t, DIM> &blockShape, marray::View<FEATURE_TYPE> &nodeFeaturesOut, const int numberOfThreads = -1)
template <std::size_t DIM, class LABELS_PROXY, class FEATURE_TYPE>
void accumulateGeometricNodeFeatures(const GridRag<DIM, LABELS_PROXY> &rag, const array::StaticArray<int64_t, DIM> &blockShape, marray::View<FEATURE_TYPE> &nodeFeaturesOut, const int numberOfThreads = -1)
template <std::size_t DIM, class LABELS_PROXY, class FEATURE_TYPE>
void accumulateGeometricEdgeFeatures(const GridRag<DIM, LABELS_PROXY> &rag, const array::StaticArray<int64_t, DIM> &blockShape, marray::View<FEATURE_TYPE> &edgeFeaturesOut, const int numberOfThreads = -1)
template <size_t DIM, class LABELS_TYPE, class LABELS, class NODE_MAP>
void gridRagAccumulateLabels(const ExplicitLabelsGridRag<DIM, LABELS_TYPE> &graph, nifty::marray::View<LABELS> data, NODE_MAP &nodeMap)
template <size_t DIM, class LABELS_TYPE, class PIXEL_ARRAY, class NODE_MAP>
void projectScalarNodeDataToPixels(const ExplicitLabelsGridRag<DIM, LABELS_TYPE> &graph, NODE_MAP &nodeData, PIXEL_ARRAY &pixelData, const int numberOfThreads = -1)
template <class GRAPH>
void findThreeCyclesEdges(const GRAPH &graph, std::vector<std::array<uint64_t, 3>> &threeCycles)
template <class GRAPH>
std::vector<std::array<uint64_t, 3>> findThreeCyclesEdges(const GRAPH &graph)
namespace agglo

Functions

bool isNegativeInf(const double val)
template <class CLUSTER_POLICY, class PY_AGGLO_CLS>
void exportAgglomerativeClusteringVisitors(py::module &aggloModule, const std::string &clusterPolicyBaseName, PY_AGGLO_CLS &aggloCls)
template <class CLUSTER_POLICY>
void exportAgglomerativeClusteringTClusterPolicy(py::module &aggloModule, const std::string &clusterPolicyBaseName)
namespace merge_rules
namespace detail_graph

Functions

template <class GRAPH, class NODE_MAP>
boost::transform_iterator<NodeLabelsToEdgeLabelsUnaryFunction<GRAPH, NODE_MAP>, typename GRAPH::EdgeIter, const uint8_t&, uint8_t> nodeLabelsToEdgeLabelsIterBegin(const GRAPH &graph, const NODE_MAP &nodeLabels)
namespace graph_maps
namespace opt
namespace common

Functions

template <class SOLVER_BASE>
void exportSolverFactory(py::module &module, const std::string objectiveName)
template <class OBJECTIVE>
void exportCCProposalGeneratorFactoryBaseT(pybind11::module &module, const std::string &objName)
template <class PROPOSAL_GENERATOR>
py::class_<typename PROPOSAL_GENERATOR::SettingsType> exportCCProposalGenerator(py::module &module, const std::string &clsName, const std::string &objName)
namespace detail_cc_fusion
namespace higher_order_multicut
namespace lifted_multicut

Typedefs

using nifty::graph::opt::lifted_multicut::LiftedMulticutVisitorBase = typedef nifty::graph::opt::common::VisitorBase< LiftedMulticutBase<OBJECTIVE> >
using nifty::graph::opt::lifted_multicut::LiftedMulticutVerboseVisitor = typedef nifty::graph::opt::common::VerboseVisitor< LiftedMulticutBase<OBJECTIVE> >
using nifty::graph::opt::lifted_multicut::LiftedMulticutEmptyVisitor = typedef nifty::graph::opt::common::EmptyVisitor< LiftedMulticutBase<OBJECTIVE> >
using nifty::graph::opt::lifted_multicut::LiftedMulticutVisitorProxy = typedef nifty::graph::opt::common::VisitorProxy< LiftedMulticutBase<OBJECTIVE> >
using nifty::graph::opt::lifted_multicut::PyDefaultMulticutObjective = typedef LiftedMulticutObjective<GRAPH, double>

Functions

template <class LIFTED_MULTICUT_OBJECTIVE, class EDGE_INDICATORS, class EDGE_SIZES, class NODE_SIZES, class OUT>
void liftedUcmFeatures(const LIFTED_MULTICUT_OBJECTIVE &objective, const EDGE_INDICATORS &edgeIndicators, const EDGE_SIZES &edgeSizes, const NODE_SIZES &nodeSizes, std::vector<double> sizeRegularizers, OUT &out)
template <class LIFTED_MULTICUT_OBJECTIVE, class EDGE_INDICATORS, class EDGE_SIZES, class NODE_SIZES, class OUT>
void liftedShortedPathFeatures(const LIFTED_MULTICUT_OBJECTIVE &objective, const EDGE_INDICATORS &edgeIndicators, std::vector<double> offsets, OUT &out, const int nThreads = -1)
template <class D_WEIGHTS, class D_OFFSETS>
auto pixel_wise_lmc_edge_gt_2d(const xt::xexpression<D_WEIGHTS> &e_gt, const xt::xexpression<D_OFFSETS> &e_offsets)
template <class SOLVER>
py::class_<typename SOLVER::SettingsType> exportLiftedMulticutSolver(py::module &liftedMulticutModule, const std::string &solverName)
namespace mincut

Typedefs

using nifty::graph::opt::mincut::MincutVisitorBase = typedef nifty::graph::opt::common::VisitorBase< MincutBase<OBJECTIVE> >
using nifty::graph::opt::mincut::MincutVerboseVisitor = typedef nifty::graph::opt::common::VerboseVisitor< MincutBase<OBJECTIVE> >
using nifty::graph::opt::mincut::MincutEmptyVisitor = typedef nifty::graph::opt::common::EmptyVisitor< MincutBase<OBJECTIVE> >
using nifty::graph::opt::mincut::MincutVisitorProxy = typedef nifty::graph::opt::common::VisitorProxy< MincutBase<OBJECTIVE> >
using nifty::graph::opt::mincut::PyDefaultMincutObjective = typedef MincutObjective<GRAPH, double>

Functions

template <class SOLVER>
py::class_<typename SOLVER::SettingsType> exportMincutSolver(py::module &mincutModule, const std::string &solverName)
namespace minstcut

Typedefs

using nifty::graph::opt::minstcut::MinstcutVisitorBase = typedef nifty::graph::opt::common::VisitorBase< MinstcutBase<OBJECTIVE> >
using nifty::graph::opt::minstcut::MinstcutVerboseVisitor = typedef nifty::graph::opt::common::VerboseVisitor< MinstcutBase<OBJECTIVE> >
using nifty::graph::opt::minstcut::MinstcutEmptyVisitor = typedef nifty::graph::opt::common::EmptyVisitor< MinstcutBase<OBJECTIVE> >
using nifty::graph::opt::minstcut::MinstcutVisitorProxy = typedef nifty::graph::opt::common::VisitorProxy< MinstcutBase<OBJECTIVE> >
using nifty::graph::opt::minstcut::PyDefaultMinstcutObjective = typedef MinstcutObjective<GRAPH, double>

Functions

template <class SOLVER>
py::class_<typename SOLVER::SettingsType> exportMinstcutSolver(py::module &minstcutModule, const std::string &solverName)
namespace multicut

Typedefs

using nifty::graph::opt::multicut::MulticutVisitorBase = typedef nifty::graph::opt::common::VisitorBase< MulticutBase<OBJECTIVE> >
using nifty::graph::opt::multicut::MulticutVerboseVisitor = typedef nifty::graph::opt::common::VerboseVisitor< MulticutBase<OBJECTIVE> >
using nifty::graph::opt::multicut::MulticutEmptyVisitor = typedef nifty::graph::opt::common::EmptyVisitor< MulticutBase<OBJECTIVE> >
using nifty::graph::opt::multicut::MulticutVisitorProxy = typedef nifty::graph::opt::common::VisitorProxy< MulticutBase<OBJECTIVE> >
using nifty::graph::opt::multicut::PyDefaultMulticutObjective = typedef MulticutObjective<GRAPH, double>

Functions

template <class SOLVER>
py::class_<typename SOLVER::SettingsType> exportMulticutSolver(py::module &multicutModule, const std::string &solverName, nifty::graph::opt::SolverDocstringHelper docHelper = nifty::graph::opt::SolverDocstringHelper ())
namespace subgraph_masks
namespace ground_truth

Functions

template <class T, class U>
void segToEdges2D(const marray::View<T> &segmentation, marray::View<U> &edges)
template <class T_SEG>
void seg2dToLiftedEdges(const marray::View<T_SEG> &segmentation, std::vector<std::array<int32_t, 2>> &edges, marray::View<uint8_t> &liftedEdgesState)
template <class T_SEG>
void seg3dToLiftedEdges(const marray::View<T_SEG> &segmentation, std::vector<std::array<int32_t, 3>> &edges, const int32_t z, marray::View<uint8_t> &liftedEdgesState)
template <class T_SEG>
void seg3dToCremiZ5Edges(const marray::View<T_SEG> &segmentation, std::vector<std::array<int32_t, 4>> &edges, marray::View<uint8_t> &liftedEdgesState)
template <class T_SEG, class T_DT, class T_OUT>
void thinSegFilter(const marray::View<T_SEG> &segmentation, const marray::View<T_DT> &dt, marray::View<T_OUT> &out, const float sigma, int radius = 0)
namespace hdf5

Functions

hid_t createFile(const std::string &filename, const CacheSettings &cacheSettings, HDF5Version hdf5version = DEFAULT_HDF5_VERSION)
hid_t openFile(const std::string &filename, const CacheSettings &cacheSettings, FileAccessMode fileAccessMode = READ_ONLY, HDF5Version hdf5version = DEFAULT_HDF5_VERSION)
namespace tools
namespace histogram

Functions

template <class HISTOGRAM, class RANK_ITER, class OUT_ITER>
void quantiles(const HISTOGRAM &histogram, RANK_ITER ranksBegin, RANK_ITER ranksEnd, OUT_ITER outIter)
namespace ilp_backend
namespace logging

Enums

enum LogLevel

Values:

NONE = 0
FATAL = 1
ERROR = 2
WARN = 3
INFO = 4
DEBUG = 5
TRACE = 6

Functions

std::string logLevelName(const LogLevel logLevel)
namespace marray
namespace math

Functions

template <class T0, class T1, size_t N>
nifty::math::PromoteTraits<T0, T1>::RealPromoteType euclideanDistance(const nifty::array::StaticArray<T0, N> &a, const nifty::array::StaticArray<T1, N> &b)
namespace meta
namespace parallel

Functions

template <class ITER, class F>
void parallel_foreach_impl(ThreadPool &pool, const std::ptrdiff_t nItems, ITER iter, ITER end, F &&f, std::random_access_iterator_tag)
template <class ITER, class F>
void parallel_foreach_impl(ThreadPool &pool, const std::ptrdiff_t nItems, ITER iter, ITER end, F &&f, std::forward_iterator_tag)
template <class ITER, class F>
void parallel_foreach_impl(ThreadPool &pool, const std::ptrdiff_t nItems, ITER iter, ITER end, F &&f, std::input_iterator_tag)
template <class ITER, class F>
void parallel_foreach_single_thread(ITER begin, ITER end, F &&f, const std::ptrdiff_t nItems = 0)
template <class ITER, class F>
void parallel_foreach(ThreadPool &pool, ITER begin, ITER end, F &&f, const std::ptrdiff_t nItems = 0)
template <class ITER, class F>
void parallel_foreach(int64_t nThreads, ITER begin, ITER end, F &&f, const std::ptrdiff_t nItems = 0)
template <class F>
void parallel_foreach(int64_t nThreads, std::ptrdiff_t nItems, F &&f)
template <class F>
void parallel_foreach(ThreadPool &threadpool, std::ptrdiff_t nItems, F &&f)
namespace tools

Functions

template <class LABEL_TYPE, std::size_t DIM, class COORD>
void readSubarray(const graph::ExplicitLabels<DIM, LABEL_TYPE> &labels, const COORD &beginCoord, const COORD &endCoord, marray::View<LABEL_TYPE> &subarray)
template <class LABEL_TYPE, std::size_t DIM, class COORD>
void readSubarray(const graph::Hdf5Labels<DIM, LABEL_TYPE> &labels, const COORD &beginCoord, const COORD &endCoord, marray::View<LABEL_TYPE> &subarray)
template <class T, class COORD>
void readSubarray(const hdf5::Hdf5Array<T> &array, const COORD &beginCoord, const COORD &endCoord, marray::View<T> &subarray)
template <class T, class COORD>
void writeSubarray(hdf5::Hdf5Array<T> &array, const COORD &beginCoord, const COORD &endCoord, const marray::View<T> &subarray)
template <class T, class COORD>
void readSubarrayLocked(const hdf5::Hdf5Array<T> &array, const COORD &beginCoord, const COORD &endCoord, marray::View<T> &subarray)
template <class T, class COORD>
void writeSubarrayLocked(hdf5::Hdf5Array<T> &array, const COORD &beginCoord, const COORD &endCoord, const marray::View<T> &subarray)
template <class T, class COORD>
void readSubarray(const marray::View<T> array, const COORD &beginCoord, const COORD &endCoord, marray::View<T> &subarray)
template <class T, class COORD>
void writeSubarray(marray::View<T> array, const COORD &beginCoord, const COORD &endCoord, const marray::View<T> &data)
template <class T, class COORD>
void readSubarrayLocked(const marray::View<T> array, const COORD &beginCoord, const COORD &endCoord, marray::View<T> &subarray)
template <class T, class COORD>
void writeSubarrayLocked(marray::View<T> array, const COORD &beginCoord, const COORD &endCoord, const marray::View<T> &data)
template <size_t DIM, class SHAPE_T, class BLOCK_SHAPE_T, class F>
void parallelForEachBlock(parallel::ThreadPool &threadpool, const array::StaticArray<SHAPE_T, DIM> &shape, const array::StaticArray<BLOCK_SHAPE_T, DIM> &blockShape, F &&f)
template <size_t DIM, class SHAPE_T, class BLOCK_SHAPE_T, class OVERLAP_SHAPE_T, class F>
void parallelForEachBlockWithOverlap(parallel::ThreadPool &threadpool, const array::StaticArray<SHAPE_T, DIM> &shape, const array::StaticArray<BLOCK_SHAPE_T, DIM> &blockShape, const array::StaticArray<OVERLAP_SHAPE_T, DIM> &overlapBegin, const array::StaticArray<OVERLAP_SHAPE_T, DIM> &overlapEnd, F &&f)
template <class SHAPE_T, class F>
void forEachCoordinateImpl(const array::StaticArray<SHAPE_T, 1> &shape, F &&f, bool firstCoordinateMajorOrder = true)
template <class SHAPE_T, class F>
void forEachCoordinateImpl(const array::StaticArray<SHAPE_T, 1> &shapeBegin, const array::StaticArray<SHAPE_T, 1> &shapeEnd, F &&f, bool firstCoordinateMajorOrder = true)
template <class SHAPE_T, class F>
void forEachCoordinateImpl(const array::StaticArray<SHAPE_T, 2> &shape, F &&f, bool firstCoordinateMajorOrder = true)
template <class SHAPE_T, class F>
void forEachCoordinateImpl(const array::StaticArray<SHAPE_T, 2> &shapeBegin, const array::StaticArray<SHAPE_T, 2> &shapeEnd, F &&f, bool firstCoordinateMajorOrder = true)
template <class SHAPE_T, class F>
void forEachCoordinateImpl(const array::StaticArray<SHAPE_T, 3> &shape, F &&f, bool firstCoordinateMajorOrder = true)
template <class SHAPE_T, class F>
void forEachCoordinateImpl(const array::StaticArray<SHAPE_T, 3> &shapeBegin, const array::StaticArray<SHAPE_T, 3> &shapeEnd, F &&f, bool firstCoordinateMajorOrder = true)
template <class SHAPE_T, class F>
void forEachCoordinateImpl(const array::StaticArray<SHAPE_T, 4> &shape, F &&f, bool firstCoordinateMajorOrder = true)
template <class SHAPE_T, class F>
void forEachCoordinateImpl(const array::StaticArray<SHAPE_T, 4> &shapeBegin, const array::StaticArray<SHAPE_T, 4> &shapeEnd, F &&f, bool firstCoordinateMajorOrder = true)
template <class SHAPE_T, size_t DIMENSIONS, class F>
void forEachCoordinate(const array::StaticArray<SHAPE_T, DIMENSIONS> &shape, F &&f, bool firstCoordinateMajorOrder = true)
template <class SHAPE_T, size_t DIMENSIONS, class F>
void forEachCoordinate(const array::StaticArray<SHAPE_T, DIMENSIONS> &shapeBegin, const array::StaticArray<SHAPE_T, DIMENSIONS> &shapeEnd, F &&f, bool firstCoordinateMajorOrder = true)
template <class SHAPE_T, size_t DIM, class F>
void parallelForEachCoordinate(nifty::parallel::ThreadPool &threadpool, const array::StaticArray<SHAPE_T, DIM> &shape, F &&f, bool firstCoordinateMajorOrder = true)
template <class T>
void makeDense(marray::View<T> &data)
template <class T>
void makeDense(const marray::View<T> &dataIn, marray::View<T> &dataOut)
template <class T, class U>
T makeFinite(const T &val, const U &replaceVal)
namespace ufd
namespace pybind11
namespace detail
namespace std
file mainpage.dox
file arithmetic_array.hxx

Defines

NIFTY_MACRO_BINARY_OP_INPLACE(operatorSymbol)
NIFTY_MACRO_BINARY_OP(operatorSymbol, inplaceSymbol)
file static_array.hxx
file vector.hxx
file bounds.hxx
file cell_vector.hxx
file cgp.hxx
file features.hxx
file geometric_features.hxx
file topological_features.hxx
file filled_topological_grid.hxx
file geometry.hxx
file topological_grid.hxx
file boost_flat_map.hxx

Defines

__nifty_mapimpl__
file boost_flat_set.hxx

Defines

__nifty_setimpl__
file flat_set.hxx
file exceptions.hxx
file half.hpp

Defines

HALF_GNUC_VERSION
HALF_CONSTEXPR
HALF_CONSTEXPR_CONST
HALF_NOEXCEPT
HALF_NOTHROW
HALF_ROUND_STYLE
HALF_ROUND_TIES_TO_EVEN
HUGE_VALH
FP_FAST_FMAH
FP_ILOGB0
FP_ILOGBNAN
FP_SUBNORMAL
FP_ZERO
FP_NAN
FP_INFINITE
FP_NORMAL
file accumulated_features.hxx
file fastfilters_wrapper.hxx
file affinities.hxx
file gaussian_curvature.hxx
file agglomerative_clustering.hxx
file cluster_policies_common.hxx
file edge_weight_merging.hxx
file merge_rules.hxx
file dual_cluster_policy.hxx
file edge_weighted_cluster_policy.hxx
file fixation_cluster_policy.hxx
file lifted_agglo_cluster_policy.hxx
file lifted_edge_weighted_cluster_policy2.hxx
file lifted_graph_edge_weighted_cluster_policy.hxx
file mala_cluster_policy.hxx
file minimum_node_size_cluster_policy.hxx
file new_policy.hxx
file node_and_edge_weighted_cluster_policy.hxx
file probabilistic_lifted_cluster_policy.hxx
file bidirectional_breadth_first_search.hxx
file breadth_first_search.hxx
file components.hxx
file depth_first_search.hxx
file adjacency.hxx
file contiguous_indices.hxx
file node_labels_to_edge_labels_iterator.hxx
file search_impl.hxx
file directed_graph_base.hxx
file directed_graph_view.hxx
file edge_contraction_graph.hxx
file edge_contraction_graph.hxx
file edge_map_from_node_map.hxx
file edge_weighted_watersheds.hxx
file graph_maps.hxx
file graph_tags.hxx
file node_weighted_watersheds.hxx
file cc_fusion_move_based_impl.hxx
file cc_fusion_move_impl.hxx
file logging_visitor.hxx
file greedy_additive_multicut_proposal_generator.hxx
file interface_flipper_proposal_generator.hxx
file proposal_generator_base.hxx
file proposal_generator_base.hxx
file proposal_generator_base.hxx
file proposal_generator_factory.hxx
file proposal_generator_factory.hxx
file proposal_generator_factory.hxx
file proposal_generator_factory_base.hxx
file proposal_generator_factory_base.hxx
file proposal_generator_factory_base.hxx
file random_node_color_proposal_generator.hxx
file stub_proposal_generator.hxx
file watershed_proposal_generator.hxx
file watershed_proposal_generator.hxx
file solver_base.hxx
file solver_factory.hxx
file solver_factory_base.hxx
file visitor_base.hxx
file higher_order_multicut_objective.hxx
file multicut_base.hxx
file multicut_base.hxx
file chained_solvers.hxx
file chained_solvers.hxx
file lifted_twocut_kernighan_lin.hxx

Defines

NIFTY_GRAPH_OPTIMIZATION_LIFTED_MULTICUT_DETAIL_LIFTED_TWOCUT_KERNIGHAN_LIN_HXX
file fusion_move.hxx
file fusion_move.hxx
file fusion_move_based.hxx
file fusion_move_based.hxx
file lifted_graph_features.hxx
file lifted_multicut_andres_greedy_additive.hxx
file lifted_multicut_andres_kernighan_lin.hxx
file lifted_multicut_base.hxx
file lifted_multicut_greedy_additive.hxx
file lifted_multicut_ilp.hxx
file lifted_multicut_kernighan_lin.hxx
file lifted_multicut_mp.hxx
file lifted_multicut_objective.hxx
file lifted_multicut_objective.hxx
file lifted_multicut_visitor_base.hxx
file pixel_wise.hxx
file pixel_wise_q.hxx
file mincut_base.hxx
file mincut_cc_fusion_move.hxx
file mincut_cc_fusion_move_based.hxx
file mincut_greedy_additive.hxx
file mincut_objective.hxx
file mincut_objective.hxx
file mincut_qpbo.hxx
file mincut_visitor_base.hxx
file random_proposal_generator.hxx
file minstcut_base.hxx
file minstcut_maxflow.hxx
file minstcut_objective.hxx
file minstcut_objective.hxx
file minstcut_visitor_base.hxx
file block_multicut.hxx
file cc_fusion_move_based.hxx
file cgc.hxx
file kernighan_lin.hxx
file multicut_andres.hxx
file multicut_decomposer.hxx
file multicut_greedy_additive.hxx
file multicut_ilp.hxx
file multicut_mp.hxx
file multicut_objective.hxx
file multicut_objective.hxx
file multicut_visitor_base.hxx
file perturb_and_map.hxx
file greedy_additive_proposals.hxx
file watershed_proposals.hxx
file paths.hxx
file probabilistic_diffusion.hxx
file compute_grid_rag.hxx
file compute_grid_rag_hdf5.hxx
file grid_rag.hxx
file grid_rag_accumulate.hxx
file grid_rag_features.hxx
file grid_rag_hdf5.hxx
file grid_rag_labels.hxx
file grid_rag_labels_hdf5.hxx
file grid_rag_stacked_2d.hxx
file grid_rag_stacked_2d_hdf5.hxx
file project_to_pixels.hxx
file shortest_path_bellman_ford.hxx
file shortest_path_dijkstra.hxx
file simple_directed_graph.hxx
file subgraph_mask.hxx
file subgraph_with_cut.hxx
file three_cycles.hxx
file undirected_graph_base.hxx
file undirected_grid_graph.hxx
file undirected_grid_graph.hxx
file undirected_list_graph.hxx
file undirected_list_graph.hxx
file undirected_long_range_grid_graph.hxx
file undirected_long_range_grid_graph.hxx
file overlap.hxx
file partition_comparison.hxx

Defines

ANDRES_PARTITION_COMPARISON_HXX
file seg_to_edges.hxx
file seg_to_lifted_edges.hxx
file hdf5.hxx
file hdf5_array.hxx
file histogram.hxx
file cplex.hxx

Defines

IL_STD
file glpk.hxx
file gurobi.hxx
file ilp_backend.hxx
file marray-fftw.hxx

Defines

ANDRES_MARRAY_FFTW_HXX
file marray-hdf5.hxx

Defines

MARRAY_HDF5_HXX
file marray.hxx

Defines

NIFTY_ANDRES_MARRAY_HXX
MARRAY_UNARY_OPERATOR(datatype, operation, functorname)
MARRAY_UNARY_OPERATOR_ALL_TYPES(op, functorname)
MARRAY_BINARY_OPERATOR(datatype, operation, functorname)
MARRAY_BINARY_OPERATOR_ALL_TYPES(op, functorname)
file marray.hxx

Defines

HAVE_CPP11_INITIALIZER_LISTS
HAVE_CPP11_STD_ARRAY
file marray_hdf5.hxx

Defines

HAVE_CPP11_INITIALIZER_LISTS
file math.hxx
file numerics.hxx
file meta.hxx
file type_order.hxx
file nifty.hxx
file nifty_config.hxx

Defines

NIFTY_VERSION_MAJOR
NIFTY_VERSION_MINOR
NIFTY_VERSION_PATCH
file threadpool.hxx
file converter.hxx
file export_agglomerative_clustering.hxx
file graph_name.hxx
file export_solver_factory.hxx
file py_proposal_generator_factory_base.hxx
file py_proposal_generator_factory_base.hxx
file py_solver_base.hxx
file py_solver_factory_base.hxx
file py_solver_visitor_base.hxx
file export_lifted_multicut_solver.hxx
file learnable_lifted_multicut_objective.hxx
file lifted_multicut_objective_name.hxx
file py_lifted_multicut_base.hxx
file py_lifted_multicut_visitor_base.hxx
file export_mincut_solver.hxx
file mincut_objective_name.hxx
file py_mincut_base.hxx
file py_mincut_visitor_base.hxx
file export_minstcut_solver.hxx
file minstcut_objective_name.hxx
file py_minstcut_base.hxx
file py_minstcut_visitor_base.hxx
file export_multicut_solver.hxx
file multicut_objective_name.hxx
file py_multicut_base.hxx
file py_multicut_visitor_base.hxx
file solver_docstring.hxx
file block_access.hxx
file blocking.hxx
file changable_priority_queue.hxx
file const_iterator_range.hxx
file for_each_block.hxx
file for_each_coordinate.hxx
file logging.hxx
file make_dense.hxx
file make_finite.hxx
file runtime_check.hxx

Defines

NIFTY_CHECK_OP(a, op, b, message)
NIFTY_CHECK(expression, message)
NIFTY_TEST(expression)
NIFTY_TEST_OP(a, op, b)
NIFTY_CHECK_EQ_TOL(a, b, tol)
NIFTY_TEST_EQ_TOL(a, b, tol)
NIFTY_CHECK_NUMBER(number)
NIFTY_ASSERT_OP(a, op, b)
NIFTY_ASSERT(expression)
file timer.hxx
file iterable_ufd.hxx
file ufd.hxx
group group_graph
group group_opt
group Group_multicut
group group_multicut_solver
group Group_lifted_multicut
group group_lifted_multicut_solver
group group_mincut
group group_mincut_solver
group group_agglo
group group_cgp
group ParallelProcessing
page todo
page citelist
dir /home/tbeier/src/nifty/include/nifty/graph/agglo
dir /home/tbeier/src/nifty/include/nifty/python/graph/agglo
dir /home/tbeier/src/nifty/include/nifty/marray/andres
dir /home/tbeier/src/nifty/include/nifty/array
dir /home/tbeier/src/nifty/include/nifty/cgp
dir /home/tbeier/src/nifty/include/nifty/graph/agglo/cluster_policies
dir /home/tbeier/src/nifty/include/nifty/graph/opt/common
dir /home/tbeier/src/nifty/include/nifty/python/graph/opt/common
dir /home/tbeier/src/nifty/include/nifty/container
dir /home/tbeier/src/nifty/include/nifty/graph/agglo/cluster_policies/detail
dir /home/tbeier/src/nifty/include/nifty/graph/detail
dir /home/tbeier/src/nifty/include/nifty/graph/opt/lifted_multicut/detail
dir /home/tbeier/src/nifty/include/nifty/graph/rag/detail_rag
dir /home/tbeier/src/nifty/include/nifty/exceptions
dir /home/tbeier/src/nifty/include/nifty/external
dir /home/tbeier/src/nifty/include/nifty/features
dir /home/tbeier/src/nifty/include/nifty/cgp/features
dir /home/tbeier/src/nifty/include/nifty/filters
dir /home/tbeier/src/nifty/include/nifty/python/graph
dir /home/tbeier/src/nifty/include/nifty/graph
dir /home/tbeier/src/nifty/include/nifty/ground_truth
dir /home/tbeier/src/nifty/include/nifty/hdf5
dir /home/tbeier/src/nifty/include/nifty/graph/opt/higher_order_multicut
dir /home/tbeier/src/nifty/include/nifty/histogram
dir /home/tbeier/src/nifty/include/nifty/ilp_backend
dir /home/tbeier/src/nifty/include
dir /home/tbeier/src/nifty/include/nifty/graph/opt/lifted_multicut
dir /home/tbeier/src/nifty/include/nifty/python/graph/opt/lifted_multicut
dir /home/tbeier/src/nifty/include/nifty/marray
dir /home/tbeier/src/nifty/include/nifty/math
dir /home/tbeier/src/nifty/include/nifty/meta
dir /home/tbeier/src/nifty/include/nifty/python/graph/opt/mincut
dir /home/tbeier/src/nifty/include/nifty/graph/opt/mincut
dir /home/tbeier/src/nifty/include/nifty/graph/opt/minstcut
dir /home/tbeier/src/nifty/include/nifty/python/graph/opt/minstcut
dir /home/tbeier/src/nifty/include/nifty/python/graph/opt/multicut
dir /home/tbeier/src/nifty/include/nifty/graph/opt/multicut
dir /home/tbeier/src/nifty
dir /home/tbeier/src/nifty/include/nifty
dir /home/tbeier/src/nifty/include/nifty/python/graph/opt
dir /home/tbeier/src/nifty/include/nifty/graph/opt
dir /home/tbeier/src/nifty/include/nifty/parallel
dir /home/tbeier/src/nifty/include/nifty/graph/opt/multicut/proposal_generators
dir /home/tbeier/src/nifty/include/nifty/graph/opt/common/proposal_generators
dir /home/tbeier/src/nifty/include/nifty/graph/opt/lifted_multicut/proposal_generators
dir /home/tbeier/src/nifty/include/nifty/graph/opt/mincut/proposal_generators
dir /home/tbeier/src/nifty/include/nifty/python
dir /home/tbeier/src/nifty/include/nifty/graph/rag
dir /home/tbeier/src
dir /home/tbeier/src/nifty/include/nifty/graph/subgraph_masks
dir /home/tbeier/src/nifty/include/nifty/tools
dir /home/tbeier/src/nifty/include/nifty/ufd
example graph/multicut/multicut.cxx
example graph/undirected_list_graph.cxx
page index