CAPD DynSys Library  5.2.0
capd::invset::CubicalMap< MapT, GraphT, ResolutionT > Class Template Reference

#include <capd/invset/CubicalMap.h>

Public Types

typedef MapT MapType
 
typedef MapType::VectorType VectorType
 
typedef MapType::MatrixType MatrixType
 
typedef VectorType::ScalarType ScalarType
 
typedef ScalarType::BoundType BoundType
 
typedef GraphT GraphType
 
typedef GraphType::OrderType OrderType
 
typedef GraphType::VertexSet VertexSet
 
typedef GraphType::VertexType VertexType
 
typedef ResolutionT ResolutionType
 
typedef GraphType::iterator iterator
 
typedef GraphType::const_iterator const_iterator
 
typedef GraphType::VertexSet SetVertex
 deprecated More...
 

Public Member Functions

 CubicalMap (MapType &map, const ResolutionType &resolution)
 
const ResolutionTypegetResolution () const
 
MapTypegetMap ()
 
VectorType vertexToCube (const VertexType &vertex) const
 converts VertexType to Cube using current resolution More...
 
template<class PointVector >
void getCubeCenter (const VertexType &vertex, PointVector &result)
 
void setDomain (const VectorType &domain)
 it grids domain with given resolution and for each box adds corresponding vertex to graph More...
 
void setDomain (const std::list< VectorType > &domainList)
 it grids domain with given resolution and for each box adds corresponding vertex to graph G More...
 
void constructCubicalMap ()
 
template<typename ConstraintsT >
void computeImageOfCubeWithConstraints (const VertexType &vertex, const ConstraintsT &constraints, VertexSet &cubicalImage)
 checks whenever set x is contained (at least partly) in the domain. More...
 
template<typename ConstraintsT >
void constructCubicalMapWithConstraints (const ConstraintsT &constraints)
 constructs cubical map with range restricted by constraints. More...
 
void constructCubicalMapRestrictedTo (const std::list< VectorType > &range)
 constructs cubical map with range restricted to given list of interval vectors More...
 
void bisectGraph (int indexOfCoeff)
 
template<typename ConstraintsT >
void removeIncorrectVertices (VertexSet &vertices, const ConstraintsT &constraints) const
 Removes vertices that do not belong to the domain. More...
 
template<typename ConstraintsT >
void removeIncorrectNodes (const ConstraintsT &constraints)
 
template<typename VertexContainer >
void computeExitSet (VertexContainer &exitSet)
 For given CubicalMap it computes exit set. More...
 
void save (const char *fileName) const
 
void load (const char *fileName)
 

Static Public Member Functions

static VertexType resolutionToDenominator (const ResolutionType &resolution)
 
static VectorType vertexToVector (const VertexType &vertex, const VertexType &denominator)
 
static VectorType vertexToCube (const VertexType &vertex, const ResolutionType &resolution)
 converts VertexType to Cube using given resolution More...
 
template<class PointVector >
static void getCubeCenter (const VertexType &vertex, const ResolutionType &resolution, PointVector &result)
 
template<class PointVector >
static void centreOfCube (const VertexType &vertex, const VertexType &denominator, PointVector &result)
 
static void insertVertexIfNotExists (GraphType &G, const VertexType &v)
 
static void insertVertexIfNotExists (VertexSet &G, const VertexType &v)
 
template<typename SetType >
static void createGrid (SetType &G, const ResolutionType &resolution, const VectorType &domain)
 it grids domain with given resolution and for each box adds corresponding vertex to set G G can be either graph (GraphType) or only set of vertices (VertexSet) More...
 
template<typename SetType >
static void createGrid (SetType &G, const ResolutionType &resolution, const std::list< VectorType > &domain)
 
static void constructCubicalMap (MapType &m_f, GraphType &graph, ResolutionType &resolution)
 Creates graph that is a cubical representation of the map f with given resolution It also creates transposed graph. More...
 
template<typename ConstraintsT >
static void constructCubicalMapWithConstraints (CubicalMap &graph, const ConstraintsT &constraints)
 /////////////////////////////////////////////////////////////////////////////////////////////// / / Creates graph that is a cubical representation of the map f with given resolution / Vertices that do not satisfy constraints are not created. More...
 

Member Typedef Documentation

◆ BoundType

template<class MapT , class GraphT , class ResolutionT = typename GraphT::VertexType>
typedef ScalarType::BoundType capd::invset::CubicalMap< MapT, GraphT, ResolutionT >::BoundType

◆ const_iterator

template<class MapT , class GraphT , class ResolutionT = typename GraphT::VertexType>
typedef GraphType::const_iterator capd::invset::CubicalMap< MapT, GraphT, ResolutionT >::const_iterator

◆ GraphType

template<class MapT , class GraphT , class ResolutionT = typename GraphT::VertexType>
typedef GraphT capd::invset::CubicalMap< MapT, GraphT, ResolutionT >::GraphType

◆ iterator

template<class MapT , class GraphT , class ResolutionT = typename GraphT::VertexType>
typedef GraphType::iterator capd::invset::CubicalMap< MapT, GraphT, ResolutionT >::iterator

◆ MapType

template<class MapT , class GraphT , class ResolutionT = typename GraphT::VertexType>
typedef MapT capd::invset::CubicalMap< MapT, GraphT, ResolutionT >::MapType

◆ MatrixType

template<class MapT , class GraphT , class ResolutionT = typename GraphT::VertexType>
typedef MapType::MatrixType capd::invset::CubicalMap< MapT, GraphT, ResolutionT >::MatrixType

◆ OrderType

template<class MapT , class GraphT , class ResolutionT = typename GraphT::VertexType>
typedef GraphType::OrderType capd::invset::CubicalMap< MapT, GraphT, ResolutionT >::OrderType

◆ ResolutionType

template<class MapT , class GraphT , class ResolutionT = typename GraphT::VertexType>
typedef ResolutionT capd::invset::CubicalMap< MapT, GraphT, ResolutionT >::ResolutionType

◆ ScalarType

template<class MapT , class GraphT , class ResolutionT = typename GraphT::VertexType>
typedef VectorType::ScalarType capd::invset::CubicalMap< MapT, GraphT, ResolutionT >::ScalarType

◆ SetVertex

template<class MapT , class GraphT , class ResolutionT = typename GraphT::VertexType>
typedef GraphType::VertexSet capd::invset::CubicalMap< MapT, GraphT, ResolutionT >::SetVertex

deprecated

◆ VectorType

template<class MapT , class GraphT , class ResolutionT = typename GraphT::VertexType>
typedef MapType::VectorType capd::invset::CubicalMap< MapT, GraphT, ResolutionT >::VectorType

◆ VertexSet

template<class MapT , class GraphT , class ResolutionT = typename GraphT::VertexType>
typedef GraphType::VertexSet capd::invset::CubicalMap< MapT, GraphT, ResolutionT >::VertexSet

◆ VertexType

template<class MapT , class GraphT , class ResolutionT = typename GraphT::VertexType>
typedef GraphType::VertexType capd::invset::CubicalMap< MapT, GraphT, ResolutionT >::VertexType

Constructor & Destructor Documentation

◆ CubicalMap()

template<class MapT , class GraphT , class ResolutionT = typename GraphT::VertexType>
capd::invset::CubicalMap< MapT, GraphT, ResolutionT >::CubicalMap ( MapType map,
const ResolutionType resolution 
)
inline

Member Function Documentation

◆ bisectGraph()

template<class MapT , class GraphT , class ResolutionT = typename GraphT::VertexType>
void capd::invset::CubicalMap< MapT, GraphT, ResolutionT >::bisectGraph ( int  indexOfCoeff)
inline

◆ centreOfCube()

template<class MapT , class GraphT , class ResolutionT = typename GraphT::VertexType>
template<class PointVector >
static void capd::invset::CubicalMap< MapT, GraphT, ResolutionT >::centreOfCube ( const VertexType vertex,
const VertexType denominator,
PointVector &  result 
)
inlinestatic

◆ computeExitSet()

template<class MapT , class GraphT , class ResolutionT = typename GraphT::VertexType>
template<typename VertexContainer >
void capd::invset::CubicalMap< MapT, GraphT, ResolutionT >::computeExitSet ( VertexContainer &  exitSet)
inline

For given CubicalMap it computes exit set.

In exitSet we return all cubes that possibly escape map domain

Parameters
[out]exitSetit can be either VertexSet or Graph

◆ computeImageOfCubeWithConstraints()

template<class MapT , class GraphT , class ResolutionT = typename GraphT::VertexType>
template<typename ConstraintsT >
void capd::invset::CubicalMap< MapT, GraphT, ResolutionT >::computeImageOfCubeWithConstraints ( const VertexType vertex,
const ConstraintsT &  constraints,
VertexSet cubicalImage 
)
inline

checks whenever set x is contained (at least partly) in the domain.

Creates graph that is a cubical representation of the map f with given resolution / Edges pointing out of range are not created. / It also creates inverted graph / / we assume that: / - domain is already set / - all edges in a graph are removed /

◆ constructCubicalMap() [1/2]

template<class MapT , class GraphT , class ResolutionT = typename GraphT::VertexType>
void capd::invset::CubicalMap< MapT, GraphT, ResolutionT >::constructCubicalMap ( )
inline

◆ constructCubicalMap() [2/2]

template<class MapT , class GraphT , class ResolutionT = typename GraphT::VertexType>
static void capd::invset::CubicalMap< MapT, GraphT, ResolutionT >::constructCubicalMap ( MapType m_f,
GraphType graph,
ResolutionType resolution 
)
inlinestatic

Creates graph that is a cubical representation of the map f with given resolution It also creates transposed graph.

we assume that:

  • domain is already set
  • all edges in a graph are removed

◆ constructCubicalMapRestrictedTo()

template<class MapT , class GraphT , class ResolutionT = typename GraphT::VertexType>
void capd::invset::CubicalMap< MapT, GraphT, ResolutionT >::constructCubicalMapRestrictedTo ( const std::list< VectorType > &  range)
inline

constructs cubical map with range restricted to given list of interval vectors

◆ constructCubicalMapWithConstraints() [1/2]

template<class MapT , class GraphT , class ResolutionT = typename GraphT::VertexType>
template<typename ConstraintsT >
void capd::invset::CubicalMap< MapT, GraphT, ResolutionT >::constructCubicalMapWithConstraints ( const ConstraintsT &  constraints)
inline

constructs cubical map with range restricted by constraints.

◆ constructCubicalMapWithConstraints() [2/2]

template<class MapT , class GraphT , class ResolutionT = typename GraphT::VertexType>
template<typename ConstraintsT >
static void capd::invset::CubicalMap< MapT, GraphT, ResolutionT >::constructCubicalMapWithConstraints ( CubicalMap< MapT, GraphT, ResolutionT > &  graph,
const ConstraintsT &  constraints 
)
inlinestatic

/////////////////////////////////////////////////////////////////////////////////////////////// / / Creates graph that is a cubical representation of the map f with given resolution / Vertices that do not satisfy constraints are not created.

/ It also creates inverted graph / / we assume that: / - domain is already set / - all edges in a graph are removed / //////////////////////////////////////////////////////////////////////////////////////////////

◆ createGrid() [1/2]

template<class MapT , class GraphT , class ResolutionT = typename GraphT::VertexType>
template<typename SetType >
static void capd::invset::CubicalMap< MapT, GraphT, ResolutionT >::createGrid ( SetType &  G,
const ResolutionType resolution,
const std::list< VectorType > &  domain 
)
inlinestatic

◆ createGrid() [2/2]

template<class MapT , class GraphT , class ResolutionT = typename GraphT::VertexType>
template<typename SetType >
static void capd::invset::CubicalMap< MapT, GraphT, ResolutionT >::createGrid ( SetType &  G,
const ResolutionType resolution,
const VectorType domain 
)
inlinestatic

it grids domain with given resolution and for each box adds corresponding vertex to set G G can be either graph (GraphType) or only set of vertices (VertexSet)

◆ getCubeCenter() [1/2]

template<class MapT , class GraphT , class ResolutionT = typename GraphT::VertexType>
template<class PointVector >
static void capd::invset::CubicalMap< MapT, GraphT, ResolutionT >::getCubeCenter ( const VertexType vertex,
const ResolutionType resolution,
PointVector &  result 
)
inlinestatic

◆ getCubeCenter() [2/2]

template<class MapT , class GraphT , class ResolutionT = typename GraphT::VertexType>
template<class PointVector >
void capd::invset::CubicalMap< MapT, GraphT, ResolutionT >::getCubeCenter ( const VertexType vertex,
PointVector &  result 
)
inline

◆ getMap()

template<class MapT , class GraphT , class ResolutionT = typename GraphT::VertexType>
MapType& capd::invset::CubicalMap< MapT, GraphT, ResolutionT >::getMap ( )
inline

◆ getResolution()

template<class MapT , class GraphT , class ResolutionT = typename GraphT::VertexType>
const ResolutionType& capd::invset::CubicalMap< MapT, GraphT, ResolutionT >::getResolution ( ) const
inline

◆ insertVertexIfNotExists() [1/2]

template<class MapT , class GraphT , class ResolutionT = typename GraphT::VertexType>
static void capd::invset::CubicalMap< MapT, GraphT, ResolutionT >::insertVertexIfNotExists ( GraphType G,
const VertexType v 
)
inlinestatic

◆ insertVertexIfNotExists() [2/2]

template<class MapT , class GraphT , class ResolutionT = typename GraphT::VertexType>
static void capd::invset::CubicalMap< MapT, GraphT, ResolutionT >::insertVertexIfNotExists ( VertexSet G,
const VertexType v 
)
inlinestatic

◆ load()

template<class MapT , class GraphT , class ResolutionT = typename GraphT::VertexType>
void capd::invset::CubicalMap< MapT, GraphT, ResolutionT >::load ( const char *  fileName)
inline

◆ removeIncorrectNodes()

template<class MapT , class GraphT , class ResolutionT = typename GraphT::VertexType>
template<typename ConstraintsT >
void capd::invset::CubicalMap< MapT, GraphT, ResolutionT >::removeIncorrectNodes ( const ConstraintsT &  constraints)
inline

◆ removeIncorrectVertices()

template<class MapT , class GraphT , class ResolutionT = typename GraphT::VertexType>
template<typename ConstraintsT >
void capd::invset::CubicalMap< MapT, GraphT, ResolutionT >::removeIncorrectVertices ( VertexSet vertices,
const ConstraintsT &  constraints 
) const
inline

Removes vertices that do not belong to the domain.

Removes vertices that do not satisfy constraints

◆ resolutionToDenominator()

template<class MapT , class GraphT , class ResolutionT = typename GraphT::VertexType>
static VertexType capd::invset::CubicalMap< MapT, GraphT, ResolutionT >::resolutionToDenominator ( const ResolutionType resolution)
inlinestatic

◆ save()

template<class MapT , class GraphT , class ResolutionT = typename GraphT::VertexType>
void capd::invset::CubicalMap< MapT, GraphT, ResolutionT >::save ( const char *  fileName) const
inline

◆ setDomain() [1/2]

template<class MapT , class GraphT , class ResolutionT = typename GraphT::VertexType>
void capd::invset::CubicalMap< MapT, GraphT, ResolutionT >::setDomain ( const std::list< VectorType > &  domainList)
inline

it grids domain with given resolution and for each box adds corresponding vertex to graph G

◆ setDomain() [2/2]

template<class MapT , class GraphT , class ResolutionT = typename GraphT::VertexType>
void capd::invset::CubicalMap< MapT, GraphT, ResolutionT >::setDomain ( const VectorType domain)
inline

it grids domain with given resolution and for each box adds corresponding vertex to graph

◆ vertexToCube() [1/2]

template<class MapT , class GraphT , class ResolutionT = typename GraphT::VertexType>
VectorType capd::invset::CubicalMap< MapT, GraphT, ResolutionT >::vertexToCube ( const VertexType vertex) const
inline

converts VertexType to Cube using current resolution

◆ vertexToCube() [2/2]

template<class MapT , class GraphT , class ResolutionT = typename GraphT::VertexType>
static VectorType capd::invset::CubicalMap< MapT, GraphT, ResolutionT >::vertexToCube ( const VertexType vertex,
const ResolutionType resolution 
)
inlinestatic

converts VertexType to Cube using given resolution

◆ vertexToVector()

template<class MapT , class GraphT , class ResolutionT = typename GraphT::VertexType>
static VectorType capd::invset::CubicalMap< MapT, GraphT, ResolutionT >::vertexToVector ( const VertexType vertex,
const VertexType denominator 
)
inlinestatic