DGtal  1.1.0
Namespaces | Data Structures | Typedefs | Functions | Variables
DGtal::functors Namespace Reference

functors namespace gathers all DGtal functors. More...

Namespaces

 deprecated
 
 ShapeGeometricFunctors
 

Data Structures

struct  Abs
 
struct  AndBoolFct2
 
class  BackwardRigidTransformation2D
 Aim: implements backward rigid transformation of point in the 2D integer space. Warring: This version uses closest neighbor interpolation. More...
 
class  BackwardRigidTransformation3D
 Aim: implements backward rigid transformation of point in 3D integer space around any arbitrary axis. This implementation uses the Rodrigues' rotation formula. Warring: This version uses closest neighbor interpolation. More...
 
struct  BallConstantFunction
 
struct  BallConstantPointFunction
 
class  BasicDomainSubSampler
 Aim: Functor that subsamples an initial domain by given a grid size and a shift vector. By this way, for a given point considered in a new domain, it allows to recover the point coordinates in the source domain. Such functor can be usefull to apply basic image subsampling in any dimensions by using ImageAdapter class. More...
 
struct  BinaryPointPredicate
 Aim: The predicate returns true when the given binary functor returns true for the two PointPredicates given at construction. More...
 
struct  BinaryPointPredicate< TPointPredicate1, TPointPredicate2, AndBoolFct2 >
 
struct  BinaryPointPredicate< TPointPredicate1, TPointPredicate2, OrBoolFct2 >
 
struct  BlueChannel
 
class  BoundaryPredicate
 Aim: The predicate on surfels that represents the frontier between a region and its complementary in an image. It can be used with ExplicitDigitalSurface or LightExplicitDigitalSurface so as to define a digital surface. Such surfaces may of course be open. More...
 
struct  Cast
 Aim: Define a simple functor using the static cast operator. More...
 
struct  Ceil
 Functor that rounds up. More...
 
struct  Ceil< void >
 Functor that rounds up. More...
 
struct  ColorRGBEncoder
 
class  Composer
 Aim: Define a new Functor from the composition of two other functors. More...
 
struct  ConstantPointPredicate
 Aim: The predicate that returns always the same value boolCst. More...
 
class  ConstImageFunctorHolder
 Transform a point-dependent (and possibly domain-dependent) functor into a constant image. More...
 
class  ConstValue
 Aim: Define a simple functor that returns a constant value (0 by default). More...
 
class  ConstValueCell
 Aim: Define a simple functor that returns a constant quantity (0 by default). More...
 
struct  DomainPredicate
 Aim: The predicate returning true iff the point is in the domain given at construction. It is just a wrapper class around the methods Domain::isInside( const Point & ), where Domain stands for any model of CDomain. More...
 
class  DomainRigidTransformation2D
 Aim: implements bounds of transformed domain. More...
 
class  DomainRigidTransformation3D
 Aim: implements bounds of transformed domain. More...
 
struct  DummyEstimatorFromSurfels
 
class  ElementaryConvolutionNormalVectorEstimator
 Aim: Estimates normal vector by convolution of elementary normal vector to adjacent surfel. More...
 
struct  EqualPointPredicate
 Aim: The predicate returns true when the point given as argument equals the reference point given at construction. More...
 
struct  FalseBoolFct0
 
struct  FalsePointPredicate
 Aim: The predicate that returns always false. More...
 
class  FlipDomainAxis
 Aim: Functor that flips the domain coordinate system from some selected axis. For instance, if a flip on the y axis is applied on a domain of bounds (0, 0, 0) (MaxX, MaxY, MaxZ), then the coordinate of P(x,y,z) will transformed in P(x, MaxY-y, z). More...
 
struct  Floor
 Functor that rounds down. More...
 
struct  Floor< void >
 Functor that rounds down. More...
 
class  ForwardRigidTransformation2D
 Aim: implements forward rigid transformation of point in the 2D integer space. Warring: This version uses closest neighbor interpolation. More...
 
class  ForwardRigidTransformation3D
 Aim: implements forward rigid transformation of point in 3D integer space around any arbitrary axis. This implementation uses the Rodrigues' rotation formula. Warring: This version uses closest neighbor interpolation. More...
 
class  FrontierPredicate
 Aim: The predicate on surfels that represents the frontier between two regions in an image. It can be used with ExplicitDigitalSurface or LightExplicitDigitalSurface so as to define a digital surface. Such surfaces may of course be open. More...
 
class  FunctorHolder
 Aim: hold any callable object (function, functor, lambda, ...) as a C(Unary)Functor model. More...
 
struct  GaussianKernel
 Aim: defines a functor on double numbers which corresponds to a Gaussian convolution kernel. This functor acts from [0,1] to [0,1]. More...
 
struct  GreenChannel
 
struct  HatFunction
 
struct  HatPointFunction
 
struct  Identity
 Aim: Define a simple default functor that just returns its argument. More...
 
struct  IdentityBoolFct1
 
struct  IICurvatureFunctor
 Aim: A functor Real -> Real that returns the 2d curvature by transforming the given volume. This functor is valid only in 2D space. More...
 
struct  IIFirstPrincipalCurvature3DFunctor
 Aim: A functor Matrix -> Real that returns the first principal curvature value by diagonalizing the given covariance matrix. This functor is valid starting from 3D space. Note that by first we mean the value with first greatest curvature in absolute value. More...
 
class  IIFirstPrincipalDirectionFunctor
 Aim: A functor Matrix -> RealVector that returns the first principal curvature direction by diagonalizing the given covariance matrix. This functor is valid starting from 2D space and is equivalent to IITangentDirectionFunctor in 2D. Note that by first we mean the direction with greatest curvature in absolute value. More...
 
struct  IIGaussianCurvature3DFunctor
 Aim: A functor Matrix -> Real that returns the Gaussian curvature by diagonalizing the given covariance matrix. This functor is valid starting from 3D space. Note that the Gaussian curvature is computed by multiplying the two gretest curvature values in absolute value. More...
 
struct  IIMeanCurvature3DFunctor
 Aim: A functor Real -> Real that returns the 3d mean curvature by transforming the given volume. This functor is valid only in 3D space. More...
 
class  IINormalDirectionFunctor
 Aim: A functor Matrix -> RealVector that returns the normal direction by diagonalizing the given covariance matrix. More...
 
struct  IIPrincipalCurvatures3DFunctor
 Aim: A functor Matrix -> std::pair<Real,Real> that returns the first and the second principal curvature value by diagonalizing the given covariance matrix. This functor is valid starting from 3D space. Note that by first we mean the value with first greatest curvature in absolute value. More...
 
class  IIPrincipalCurvaturesAndDirectionsFunctor
 Aim: A functor Matrix -> std::pair<RealVector,RealVector> that returns the first and the second principal curvature directions by diagonalizing the given covariance matrix. This functor is valid only for 3D space. Note that by second we mean the direction with second greatest curvature in absolute value. More...
 
class  IIPrincipalDirectionsFunctor
 Aim: A functor Matrix -> std::pair<RealVector,RealVector> that returns the first and the second principal curvature directions by diagonalizing the given covariance matrix. This functor is valid starting from 3D space. Note that by second we mean the direction with second greatest curvature in absolute value. More...
 
struct  IISecondPrincipalCurvature3DFunctor
 Aim: A functor Matrix -> Real that returns the second principal curvature value by diagonalizing the given covariance matrix. This functor is valid starting from 3D space. Note that by second we mean the value with second greatest curvature in absolute value. More...
 
class  IISecondPrincipalDirectionFunctor
 Aim: A functor Matrix -> RealVector that returns the second principal curvature direction by diagonalizing the given covariance matrix. This functor is valid starting from 3D space. Note that by second we mean the direction with second greatest curvature in absolute value. More...
 
class  IITangentDirectionFunctor
 Aim: A functor Matrix -> RealVector that returns the tangent direction by diagonalizing the given covariance matrix. This functor is valid only in 2D space. More...
 
struct  ImpliesBoolFct2
 
class  IntervalForegroundPredicate
 Aim: Define a simple Foreground predicate thresholding image values between two constant values (the first one being excluded). More...
 
class  IntervalThresholder
 Aim: A small functor with an operator () that compares one value to an interval. More...
 
struct  IsLowerPointPredicate
 Aim: The predicate returns true when the point is below (or equal) the given upper bound. More...
 
struct  IsUpperPointPredicate
 Aim: The predicate returns true when the point is above (or equal) the given lower bound. More...
 
struct  IsWithinPointPredicate
 Aim: The predicate returns true when the point is within the given bounds. More...
 
struct  Lambda64Function
 
struct  LambdaExponentialFunction
 
struct  LambdaSinFromPiFunction
 
struct  LargeTruncationFunctor
 Binary functor that returns the algebraic quotient i of a/b with any fractional part discarded (truncation toward zero).
Note that \( |i| \leq |a/b| \). More...
 
class  LinearLeastSquareFittingNormalVectorEstimator
 Aim: Estimates normal vector using CGAL linear least squares plane fitting. More...
 
struct  MagickCast
 
struct  MagickCast< Color >
 
struct  Max
 
struct  MeanChannels
 
struct  Min
 Duplicated STL functors. More...
 
struct  Minus
 
class  MongeJetFittingGaussianCurvatureEstimator
 Aim: Estimates Gaussian curvature using CGAL Jet Fitting and Monge Form. More...
 
class  MongeJetFittingMeanCurvatureEstimator
 Aim: Estimates Mean curvature using CGAL Jet Fitting and Monge Form. More...
 
class  MongeJetFittingNormalVectorEstimator
 Aim: Estimates normal vector using CGAL Jet Fitting and Monge Form. More...
 
class  MongeJetFittingPrincipalCurvaturesEstimator
 Aim: Estimates Gaussian curvature using CGAL Jet Fitting and Monge Form. More...
 
struct  MultiplicationByScalar
 
struct  NotBoolFct1
 
struct  NotPointPredicate
 Aim: The predicate returns true when the point predicate given at construction return false. Thus inverse a predicate: NOT operator. More...
 
struct  OrBoolFct2
 
class  Pair1st
 Aim: Define a simple functor that returns the first member of a pair. More...
 
class  Pair1stMutator
 Aim: Define a simple unary functor that returns a reference on the first member of a pair in order to update it. More...
 
class  Pair2nd
 Aim: Define a simple functor that returns the second member of a pair. More...
 
class  Pair2ndMutator
 Aim: Define a simple unary functor that returns a reference on the first member of a pair in order to update it. More...
 
class  Point2DEmbedderIn3D
 Aim: Functor that embeds a 2D point into a 3D space from two axis vectors and an origin point given in the 3D space. More...
 
class  Point2ShapePredicate
 
struct  Point2ShapePredicateComparator
 Aim: A small struct with an operator that compares two values according to two bool template parameters. More...
 
struct  Point2ShapePredicateComparator< T, false, false >
 Aim: A small struct with an operator that compares two values (<). More...
 
struct  Point2ShapePredicateComparator< T, false, true >
 Aim: A small struct with an operator that compares two values (<=). More...
 
struct  Point2ShapePredicateComparator< T, true, false >
 Aim: A small struct with an operator that compares two values (>). More...
 
struct  Point2ShapePredicateComparator< T, true, true >
 Aim: A small struct with an operator that compares two values (>=). More...
 
struct  PointFunctorFromPointPredicateAndDomain
 Create a point functor from a point predicate and a domain. More...
 
class  PointFunctorHolder
 Aim: hold any object callable on points as a DGtal::concepts::CPointFunctor model. More...
 
struct  PointFunctorPredicate
 Aim: The predicate returns true when the predicate returns true for the value assigned to a given point in the point functor. More...
 
class  PolarPointComparatorBy2x2DetComputer
 Aim: Class that implements a binary point predicate, which is able to compare the position of two given points \( P, Q \) around a pole \( O \). More precisely, it compares the oriented angles lying between the horizontal line passing by \( O \) and the rays \( [OP) \) and \( [OQ) \) (in a counter-clockwise orientation). More...
 
struct  PositionFunctorFrom2DPoint
 Functor that returns the position of any point/vector with respect to a digital straight line of shift myShift. We recall that the shift vector is a vector translating a point of remainder \( r \) to a point of remainder \( r + \omega \). See Digital straight lines and segments for further details. More...
 
struct  PredicateCombiner
 Aim: The predicate returns true when the given binary functor returns true for the two Predicates given at construction. More...
 
struct  Projector
 Aim: Functor that maps a point P of dimension i to a point Q of dimension j. The member myDims is an array containing the coordinates - (0, 1, ..., j-1) by default - that are copied from P to Q. More...
 
struct  RedChannel
 
struct  Rescaling
 Aim: Functor allowing to rescale a value. Values of the initial scale [initMin,initMax] are rescaled to the new scale [newMin,newMax]. More...
 
struct  Round
 Functor that rounds to the nearest integer. More...
 
struct  Round< void >
 Functor that rounds to the nearest integer. More...
 
class  SCellToArrow
 Aim: transforms a signed cell into an arrow, ie. a pair point-vector. More...
 
class  SCellToCode
 Aim: transforms a 2d signed cell, basically a linel, into a code (0,1,2 or 3),. More...
 
class  SCellToIncidentPoints
 Aim: transforms a signed cell c into a pair of points corresponding to the signed cells of greater dimension that are indirectly and directly incident to c. More...
 
class  SCellToInnerPoint
 Aim: transforms a signed cell c into a point corresponding to the signed cell of greater dimension that is indirectly incident to c. More...
 
class  SCellToOuterPoint
 Aim: transforms a signed cell c into a point corresponding to the signed cell of greater dimension that is directly incident to c. More...
 
class  SCellToPoint
 Aim: transforms a scell into a point. More...
 
class  SimpleThresholdForegroundPredicate
 Aim: Define a simple Foreground predicate thresholding image values given a single thresold. More precisely, the functor operator() returns true if the value is greater than a given threshold. More...
 
class  SliceRotator2D
 Special Point Functor that adds one dimension to a 2D point and apply on it a rotation of angle alpha according to a given direction and the domain center. It also checks if the resulting point is inside the 3D domain, else it returns a particular point (by default the point at domain origin (from the domain method lowerBound()). More...
 
class  SphereFittingEstimator
 Aim: Use Patate library to perform a local sphere fitting. More...
 
class  SphericalHoughNormalVectorEstimator
 Aim: This functor estimates normal vector for a collection of surfels using spherical accumulator based Hough voting. More...
 
struct  StrictTruncationFunctor
 BinaryFunctor that computes the algebraic quotient i of a/b with any non zero fractional part discarded (truncation toward zero), and that returns i+1 (resp. i-1) if a is negative (resp. positive) if b divides a. Since we assume that a is not equal to 0, we have \( |i| < |a/b| \). See also LargeTruncationFunctor. More...
 
struct  SurfelSetPredicate
 Aim: The predicate returning true iff the point is in the domain given at construction. More...
 
class  TensorVotingFeatureExtraction
 Aim: Implements a functor to detect feature points from normal tensor voting strategy. More...
 
class  Thresholder
 Aim: A small functor with an operator () that compares one value to a threshold value according to two bool template parameters. More...
 
struct  Thresholder< T, false, false >
 
struct  Thresholder< T, false, true >
 
struct  Thresholder< T, true, false >
 
struct  Thresholder< T, true, true >
 
struct  TrueBoolFct0
 
struct  TruePointPredicate
 Aim: The predicate that returns always true. More...
 
struct  Trunc
 Functor that rounds towards zero. More...
 
struct  Trunc< void >
 Functor that rounds towards zero. More...
 
struct  UnaryMinus
 
struct  VCMAbsoluteCurvatureFunctor
 Aim: A functor Surfel -> Quantity that returns the absolute curvature at given surfel. This class has meaning only in 2D. More...
 
struct  VCMFirstPrincipalAbsoluteCurvatureFunctor
 Aim: A functor Surfel -> Quantity that returns the first principal absolute curvature (greatest curvature) at given surfel. This class has meaning only in 3D. More...
 
struct  VCMMeanAbsoluteCurvatures3DFunctor
 Aim: A functor Surfel -> Quantity that returns the mean of absolute curvatures at given surfel: (abs(k1)+abs(k2))/2. This class has meaning only in 3D. More...
 
struct  VCMNormalVectorFunctor
 Aim: A functor Surfel -> Quantity that returns the outer normal vector at given surfel. More...
 
struct  VCMSecondPrincipalAbsoluteCurvatureFunctor
 Aim: A functor Surfel -> Quantity that returns the second principal absolute curvature (smallest curvature) at given surfel. This class has meaning only in 3D. More...
 
struct  VectorRounding
 
struct  XorBoolFct2
 

Typedefs

typedef boost::function0< bool > BoolFunctor0
 
typedef boost::function1< bool, bool > BoolFunctor1
 
typedef boost::function2< bool, bool, bool > BoolFunctor2
 
typedef boost::function3< bool, bool, bool, bool > BoolFunctor3
 

Functions

template<typename FunctorStorage , bool NeedDereference>
std::ostream & operator<< (std::ostream &out, const FunctorHolder< FunctorStorage, NeedDereference > &object)
 Overloads 'operator<<' for displaying objects of class FunctorHolder. More...
 
template<typename Function >
auto holdFunctor (Function &&fn) -> decltype(holdFunctorImpl(std::forward< Function >(fn), typename std::is_lvalue_reference< Function >
 Hold any callable object (function, functor, lambda, ...) as a C(Unary)Functor model. More...
 
template<typename TPoint , typename TDetComputer >
std::ostream & operator<< (std::ostream &out, const PolarPointComparatorBy2x2DetComputer< TPoint, TDetComputer > &object)
 
template<typename TDomain , typename TValue , typename TFunctor >
std::ostream & operator<< (std::ostream &out, const ConstImageFunctorHolder< TDomain, TValue, TFunctor > &object)
 Overloads 'operator<<' for displaying objects of class ConstImageFunctorHolder. More...
 
template<typename TValue , typename TDomain , typename TFunctor >
auto holdConstImageFunctor (TDomain const &aDomain, TFunctor &&aFunctor) -> ConstImageFunctorHolder< TDomain, TValue, decltype(holdFunctor(std::forward< TFunctor >(aFunctor)))>
 ConstImageFunctorHolder construction helper with specification of the return type. More...
 
template<typename TDomain , typename TFunctor >
auto holdConstImageFunctor (TDomain const &aDomain, TFunctor &&aFunctor) -> ConstImageFunctorHolder< TDomain, typename std::decay< decltype(aFunctor(std::declval< typename TDomain::Point >()))>::type, decltype(holdFunctor(std::forward< TFunctor >(aFunctor))) >
 ConstImageFunctorHolder construction helper with auto-deduction of the return type. More...
 
template<typename TPoint , typename TValue , typename TFunctor >
std::ostream & operator<< (std::ostream &out, const PointFunctorHolder< TPoint, TValue, TFunctor > &object)
 Overloads 'operator<<' for displaying objects of class PointFunctorHolder. More...
 
template<typename TPoint , typename TValue , typename TFunctor >
auto holdPointFunctor (TFunctor &&aFunctor) -> PointFunctorHolder< TPoint, TValue, decltype(holdFunctor(std::forward< TFunctor >(aFunctor)))>
 PointFunctorHolder construction helper with specification of the return type. More...
 
template<typename TPoint , typename TFunctor >
auto holdPointFunctor (TFunctor &&aFunctor) -> PointFunctorHolder< TPoint, typename std::decay< decltype(aFunctor(std::declval< TPoint >()))>::type, decltype(holdFunctor(std::forward< TFunctor >(aFunctor))) >
 PointFunctorHolder construction helper with auto-deduction of the return type. More...
 

Variables

static const BoolFunctor0 trueBF0 = TrueBoolFct0()
 
static const BoolFunctor0 falseBF0 = FalseBoolFct0()
 
static const BoolFunctor1 identityBF1 = IdentityBoolFct1()
 
static const BoolFunctor1 notBF1 = NotBoolFct1()
 
static const BoolFunctor2 andBF2 = AndBoolFct2()
 
static const BoolFunctor2 orBF2 = OrBoolFct2()
 
static const BoolFunctor2 xorBF2 = XorBoolFct2()
 
static const BoolFunctor2 impliesBF2 = ImpliesBoolFct2()
 

Detailed Description

functors namespace gathers all DGtal functors.

Aim: Provide various lambda functions and others L-MST related functors.

Description: Extension of namespace functors by functors related to L-MST.

A lambda function \(\lambda()\) - maps from [0,1] \(\in \mathbb{R}_+\) with F(0) = F(1) = 0 and F() > 0 elsewhere and need to satisfy convexity/concavity property. For more information see J.-O. Lachaud et el [59].

Typedef Documentation

◆ BoolFunctor0

typedef boost::function0< bool > DGtal::functors::BoolFunctor0

May hold bool functors taking no arguments.

Definition at line 54 of file BasicBoolFunctors.h.

◆ BoolFunctor1

typedef boost::function1< bool, bool > DGtal::functors::BoolFunctor1

May hold bool functors taking one bool argument.

Definition at line 59 of file BasicBoolFunctors.h.

◆ BoolFunctor2

typedef boost::function2< bool, bool, bool > DGtal::functors::BoolFunctor2

May hold bool functors taking two bool arguments.

Definition at line 64 of file BasicBoolFunctors.h.

◆ BoolFunctor3

typedef boost::function3< bool, bool, bool, bool > DGtal::functors::BoolFunctor3

May hold bool functors taking three bool arguments (Useful ?).

Definition at line 69 of file BasicBoolFunctors.h.

Function Documentation

◆ holdConstImageFunctor() [1/2]

template<typename TValue , typename TDomain , typename TFunctor >
auto DGtal::functors::holdConstImageFunctor ( TDomain const &  aDomain,
TFunctor &&  aFunctor 
) -> ConstImageFunctorHolder<TDomain, TValue, decltype(holdFunctor(std::forward<TFunctor>(aFunctor)))>
inline

ConstImageFunctorHolder construction helper with specification of the return type.

Template Parameters
TValueThe image value type.
TDomainThe domain type (auto-deduced).
TFunctorThe functor type (auto-deduced).
Parameters
aDomainThe image domain.
aFunctorThe functor that generates the image.
Returns
an instance of the appropriate ConstImageFunctorHolder type.
See also
ConstImageFunctorHolder

Definition at line 277 of file ConstImageFunctorHolder.h.

279  {
280  return ConstImageFunctorHolder<TDomain, TValue, decltype(holdFunctor(std::forward<TFunctor>(aFunctor)))>{ aDomain, holdFunctor(std::forward<TFunctor>(aFunctor)) };
281  }

References holdFunctor().

Referenced by main().

◆ holdConstImageFunctor() [2/2]

template<typename TDomain , typename TFunctor >
auto DGtal::functors::holdConstImageFunctor ( TDomain const &  aDomain,
TFunctor &&  aFunctor 
) -> ConstImageFunctorHolder< TDomain, typename std::decay<decltype(aFunctor(std::declval<typename TDomain::Point>()))>::type, decltype(holdFunctor(std::forward<TFunctor>(aFunctor))) >
inline

ConstImageFunctorHolder construction helper with auto-deduction of the return type.

Template Parameters
TDomainThe domain type (auto-deduced).
TFunctorThe functor type (auto-deduced).
Parameters
aDomainThe image domain.
aFunctorThe functor (unary or binary) that generates the image.
Returns
an instance of the appropriate ConstImageFunctorHolder type.
Note
You don't have to choose between the version for unary or binary functor: this choice is automatically done using SFINAE technique.
See also
ConstImageFunctorHolder and Images for more informations.

Definition at line 305 of file ConstImageFunctorHolder.h.

311  {
312  return ConstImageFunctorHolder<
313  TDomain,
314  typename std::decay<decltype(aFunctor(std::declval<typename TDomain::Point>()))>::type,
315  decltype(holdFunctor(std::forward<TFunctor>(aFunctor)))
316  >{ aDomain, holdFunctor(std::forward<TFunctor>(aFunctor)) };
317  }

References holdFunctor().

◆ holdFunctor()

template<typename Function >
auto DGtal::functors::holdFunctor ( Function &&  fn) -> decltype(holdFunctorImpl(std::forward<Function>(fn), typename std::is_lvalue_reference<Function>
inline

Hold any callable object (function, functor, lambda, ...) as a C(Unary)Functor model.

Template Parameters
FunctionThe callable object type (auto-deduced, do not specify it)
Parameters
fnThe callable object to be holded.
Returns
a FunctorHolder instance with appropriate storage type depending on the given object.
See also
FunctorHolder and Using functions, functors and lambdas in DGtal for more informations

Definition at line 279 of file FunctorHolder.h.

280  {})) // Can we please pass to C++14 ?

Referenced by get_mean_binarizer_from_range(), get_trivial_binarizer(), holdConstImageFunctor(), holdPointFunctor(), and main().

◆ holdPointFunctor() [1/2]

template<typename TPoint , typename TValue , typename TFunctor >
auto DGtal::functors::holdPointFunctor ( TFunctor &&  aFunctor) -> PointFunctorHolder<TPoint, TValue, decltype(holdFunctor(std::forward<TFunctor>(aFunctor)))>
inline

PointFunctorHolder construction helper with specification of the return type.

Template Parameters
TPointThe point type.
TValueThe functor value type.
TFunctorThe functor type (auto-deduced).
Parameters
aFunctorThe functor to hold.
Returns
an instance of the appropriate PointFunctorHolder type.
See also
PointFunctorHolder

Definition at line 196 of file PointFunctorHolder.h.

198  {
199  return PointFunctorHolder<TPoint, TValue, decltype(holdFunctor(std::forward<TFunctor>(aFunctor)))>{
200  holdFunctor(std::forward<TFunctor>(aFunctor))
201  };
202  }

References holdFunctor().

◆ holdPointFunctor() [2/2]

template<typename TPoint , typename TFunctor >
auto DGtal::functors::holdPointFunctor ( TFunctor &&  aFunctor) -> PointFunctorHolder< TPoint, typename std::decay<decltype(aFunctor(std::declval<TPoint>()))>::type, decltype(holdFunctor(std::forward<TFunctor>(aFunctor))) >
inline

PointFunctorHolder construction helper with auto-deduction of the return type.

Template Parameters
TPointThe point type.
TFunctorThe functor type (auto-deduced).
Parameters
aFunctorThe functor to hold.
Returns
an instance of the appropriate PointFunctorHolder type.
See also
PointFunctorHolder and Using functions, functors and lambdas in DGtal for more informations.

Definition at line 218 of file PointFunctorHolder.h.

224  {
225  return PointFunctorHolder<
226  TPoint,
227  typename std::decay<decltype(aFunctor(std::declval<TPoint>()))>::type,
228  decltype(holdFunctor(std::forward<TFunctor>(aFunctor)))
229  >{ holdFunctor(std::forward<TFunctor>(aFunctor)) };
230  }

References holdFunctor().

◆ operator<<() [1/4]

template<typename TDomain , typename TValue , typename TFunctor >
std::ostream& DGtal::functors::operator<< ( std::ostream &  out,
const ConstImageFunctorHolder< TDomain, TValue, TFunctor > &  object 
)

Overloads 'operator<<' for displaying objects of class ConstImageFunctorHolder.

Parameters
outthe output stream where the object is written.
objectthe object of class ConstImageFunctorHolder to write.
Returns
the output stream after the writing.

Definition at line 253 of file ConstImageFunctorHolder.h.

255 {
256  object.selfDisplay(out);
257  return out;
258 }

◆ operator<<() [2/4]

template<typename FunctorStorage , bool NeedDereference>
std::ostream& DGtal::functors::operator<< ( std::ostream &  out,
const FunctorHolder< FunctorStorage, NeedDereference > &  object 
)

Overloads 'operator<<' for displaying objects of class FunctorHolder.

Parameters
outthe output stream where the object is written.
objectthe object of class FunctorHolder to write.
Returns
the output stream after the writing.

Definition at line 238 of file FunctorHolder.h.

240 {
241  object.selfDisplay( out );
242  return out;
243 }

◆ operator<<() [3/4]

template<typename TPoint , typename TValue , typename TFunctor >
std::ostream& DGtal::functors::operator<< ( std::ostream &  out,
const PointFunctorHolder< TPoint, TValue, TFunctor > &  object 
)

Overloads 'operator<<' for displaying objects of class PointFunctorHolder.

Parameters
outthe output stream where the object is written.
objectthe object of class PointFunctorHolder to write.
Returns
the output stream after the writing.

Definition at line 172 of file PointFunctorHolder.h.

174 {
175  object.selfDisplay(out);
176  return out;
177 }

◆ operator<<() [4/4]

template<typename TPoint , typename TDetComputer >
std::ostream& DGtal::functors::operator<< ( std::ostream &  out,
const PolarPointComparatorBy2x2DetComputer< TPoint, TDetComputer > &  object 
)

Overloads 'operator<<' for displaying objects of class 'PolarPointComparatorBy2x2DetComputer'.

Parameters
outthe output stream where the object is written.
objectthe object of class 'PolarPointComparatorBy2x2DetComputer' to write.
Returns
the output stream after the writing.

Variable Documentation

◆ andBF2

const BoolFunctor2 DGtal::functors::andBF2 = AndBoolFct2()
static

The object function and (2 bool args).

Definition at line 150 of file BasicBoolFunctors.h.

◆ falseBF0

const BoolFunctor0 DGtal::functors::falseBF0 = FalseBoolFct0()
static

The object function (0 bool args) returning false.

Definition at line 93 of file BasicBoolFunctors.h.

◆ identityBF1

const BoolFunctor1 DGtal::functors::identityBF1 = IdentityBoolFct1()
static

The object function identity (1 bool args).

Definition at line 112 of file BasicBoolFunctors.h.

◆ impliesBF2

const BoolFunctor2 DGtal::functors::impliesBF2 = ImpliesBoolFct2()
static

The object function implies (2 bool args).

Definition at line 165 of file BasicBoolFunctors.h.

◆ notBF1

const BoolFunctor1 DGtal::functors::notBF1 = NotBoolFct1()
static

The object function NOT (1 bool args).

Definition at line 117 of file BasicBoolFunctors.h.

◆ orBF2

const BoolFunctor2 DGtal::functors::orBF2 = OrBoolFct2()
static

The object function or (2 bool args).

Definition at line 155 of file BasicBoolFunctors.h.

◆ trueBF0

const BoolFunctor0 DGtal::functors::trueBF0 = TrueBoolFct0()
static

The object function (0 bool args) returning true.

Definition at line 88 of file BasicBoolFunctors.h.

◆ xorBF2

const BoolFunctor2 DGtal::functors::xorBF2 = XorBoolFct2()
static

The object function xor (2 bool args).

Definition at line 160 of file BasicBoolFunctors.h.

DGtal::functors::holdFunctor
auto holdFunctor(Function &&fn) -> decltype(holdFunctorImpl(std::forward< Function >(fn), typename std::is_lvalue_reference< Function >
Hold any callable object (function, functor, lambda, ...) as a C(Unary)Functor model.
Definition: FunctorHolder.h:279