DGtal  1.4.beta
BoundedLatticePolytope.h
1 
17 #pragma once
18 
31 #if defined(BoundedLatticePolytope_RECURSES)
32 #error Recursive header files inclusion detected in BoundedLatticePolytope.h
33 #else // defined(BoundedLatticePolytope_RECURSES)
34 
35 #define BoundedLatticePolytope_RECURSES
36 
37 #if !defined BoundedLatticePolytope_h
38 
39 #define BoundedLatticePolytope_h
40 
42 // Inclusions
43 #include <iostream>
44 #include <list>
45 #include <vector>
46 #include <string>
47 #include "DGtal/base/Common.h"
48 #include "DGtal/kernel/CSpace.h"
49 #include "DGtal/kernel/domains/HyperRectDomain.h"
50 #include "DGtal/arithmetic/IntegerComputer.h"
51 #include "DGtal/arithmetic/ClosedIntegerHalfPlane.h"
53 
54 namespace DGtal
55 {
57  // template class BoundedLatticePolytope
72  template < typename TSpace >
74  {
76 
77  public:
79  typedef TSpace Space;
80  typedef typename Space::Integer Integer;
81  typedef typename Space::Point Point;
82  typedef typename Space::Vector Vector;
83  typedef std::vector<Vector> InequalityMatrix;
84  typedef std::vector<Integer> InequalityVector;
87 #ifdef WITH_BIGINTEGER
89 #else
90  typedef DGtal::int64_t BigInteger;
91 #endif
93 
98  struct UnitSegment {
100  UnitSegment( Dimension d ) : k( d ) {}
101  };
102 
110  };
111 
119  };
120 
126  struct UnitCell {
127  std::vector<Dimension> dims;
128  UnitCell( std::initializer_list<Dimension> l )
129  : dims( l.begin(), l.end() ) {}
130 
137  friend std::ostream&
138  operator<< ( std::ostream & out,
139  const UnitCell & object )
140  {
141  out << "{";
142  for ( Dimension i = 0; i < object.dims.size(); ++i ) out << object.dims[ i ];
143  out << "}";
144  return out;
145  }
146  };
147 
154  std::vector<Dimension> dims;
155  RightStrictUnitCell( std::initializer_list<Dimension> l )
156  : dims( l.begin(), l.end() ) {}
157 
164  friend std::ostream&
165  operator<< ( std::ostream & out,
166  const RightStrictUnitCell & object )
167  {
168  out << "{";
169  for ( Dimension i = 0; i < object.dims.size(); ++i ) out << object.dims[ i ];
170  out << "}";
171  return out;
172  }
173  };
174 
181  std::vector<Dimension> dims;
182  LeftStrictUnitCell( std::initializer_list<Dimension> l )
183  : dims( l.begin(), l.end() ) {}
184 
191  friend std::ostream&
192  operator<< ( std::ostream & out,
193  const LeftStrictUnitCell & object )
194  {
195  out << "{";
196  for ( Dimension i = 0; i < object.dims.size(); ++i ) out << object.dims[ i ];
197  out << "}";
198  return out;
199  }
200  };
201 
204 
208  ~BoundedLatticePolytope() = default;
209 
213  BoundedLatticePolytope() = default;
214 
219  BoundedLatticePolytope ( const Self & other ) = default;
220 
221 
228  BoundedLatticePolytope( std::initializer_list<Point> l );
229 
238  template <typename PointIterator>
239  BoundedLatticePolytope( PointIterator itB, PointIterator itE );
240 
260  template <typename HalfSpaceIterator>
262  HalfSpaceIterator itB, HalfSpaceIterator itE,
263  bool valid_edge_constraints = false,
264  bool check_duplicate_constraints = false );
265 
285  template <typename HalfSpaceIterator>
286  void init( const Domain& domain,
287  HalfSpaceIterator itB, HalfSpaceIterator itE,
288  bool valid_edge_constraints = false,
289  bool check_duplicate_constraints = false );
290 
291 
304  template <typename PointIterator>
305  bool init( PointIterator itB, PointIterator itE );
306 
312  Self & operator= ( const Self & other ) = default;
313 
315  void clear();
316 
320 
324 
326 
327  // ----------------------- Accessor services ------------------------------
328  public:
331 
333  const Domain& getDomain() const;
334 
336  unsigned int nbHalfSpaces() const;
337 
343  const Vector& getA( unsigned int i ) const;
344 
350  Integer getB( unsigned int i ) const;
351 
357  bool isLarge( unsigned int i ) const;
358 
360  const InequalityMatrix& getA() const;
361 
363  const InequalityVector& getB() const;
367  const std::vector<bool>& getI() const;
368 
373  bool canBeSummed() const;
374 
376 
377  // ----------------------- Check point services ------------------------------
378  public:
379 
382 
387  bool isInside( const Point& p ) const;
388 
395  bool isDomainPointInside( const Point& p ) const;
396 
401  bool isInterior( const Point& p ) const;
402 
407  bool isBoundary( const Point& p ) const;
408 
410 
411  // ----------------------- Modification services ------------------------------
412  public:
413 
416 
417 
430  unsigned int cut( Dimension k, bool pos, Integer b, bool large = true );
431 
449  unsigned int cut( const Vector& a, Integer b, bool large = true,
450  bool valid_edge_constraint = false );
451 
468  unsigned int cut( const HalfSpace & hs, bool large = true,
469  bool valid_edge_constraint = false );
470 
475  void swap( BoundedLatticePolytope & other );
476 
477 
483  Self& operator*=( Integer t );
484 
491  Self& operator+=( UnitSegment s );
492 
499  Self& operator+=( UnitCell c );
500 
507  Self& operator+=( RightStrictUnitSegment s );
508 
515  Self& operator+=( RightStrictUnitCell c );
516 
523  Self& operator+=( LeftStrictUnitSegment s );
524 
531  Self& operator+=( LeftStrictUnitCell c );
533 
534  // ----------------------- Enumeration services ------------------------------
535  public:
536 
539 
548  Integer count() const;
549 
561  Integer countInterior() const;
562 
574  Integer countBoundary() const;
575 
587  Integer countWithin( Point low, Point hi ) const;
588 
606  Integer countUpTo( Integer max ) const;
607 
617  void getPoints( std::vector<Point>& pts ) const;
618 
633  void getKPoints( std::vector<Point>& pts, const Point& alpha_shift ) const;
634 
644  void getInteriorPoints( std::vector<Point>& pts ) const;
645 
655  void getBoundaryPoints( std::vector<Point>& pts ) const;
656 
668  template <typename PointSet>
669  void insertPoints( PointSet& pts_set ) const;
670 
687  template <typename PointSet>
688  void insertKPoints( PointSet& pts_set, const Point& alpha_shift ) const;
689 
691 
692  // -------------- Enumeration services (old methods by scanning ) --------------
693  public:
694 
697 
705  Integer countByScanning() const;
706 
718 
730 
741  Integer countWithinByScanning( Point low, Point hi ) const;
742 
760 
769  void getPointsByScanning( std::vector<Point>& pts ) const;
770 
779  void getInteriorPointsByScanning( std::vector<Point>& pts ) const;
780 
789  void getBoundaryPointsByScanning( std::vector<Point>& pts ) const;
790 
801  template <typename PointSet>
802  void insertPointsByScanning( PointSet& pts_set ) const;
803 
805 
806 
807  // ----------------------- Interface --------------------------------------
808  public:
811 
816  void selfDisplay ( std::ostream & out ) const;
817 
824  bool isValid() const;
825 
829  std::string className() const;
830 
832 
833  // ------------------------- Protected Datas ------------------------------
834  protected:
842  std::vector<bool> I;
845 
846  // ------------------------- Private Datas --------------------------------
847  private:
848 
849 
850  // ------------------------- Internals ------------------------------------
851  private:
859 
866 
873 
874  }; // end of class BoundedLatticePolytope
875 
876  namespace detail {
885  template <DGtal::Dimension N, typename TInteger>
887  typedef TInteger Integer;
889  typedef typename Space::Point Point;
890  typedef typename Space::Vector Vector;
893 
906  static void
907  addEdgeConstraint( Polytope& , unsigned int , unsigned int ,
908  const std::vector<Point>& )
909  {
910  trace.error() << "[BoundedLatticePolytopeHelper::addEdgeConstraint]"
911  << " this method is only implemented in 3D." << std::endl;
912  }
913 
916  static
917  Vector crossProduct( const Vector& , const Vector& )
918  {
919  trace.error() << "[BoundedLatticePolytopeHelper::crossProduct]"
920  << " this method is only implemented in 3D." << std::endl;
921  return Vector::zero;
922  }
923  };
924 
932  template <typename TInteger>
933  struct BoundedLatticePolytopeSpecializer<3, TInteger> {
934  typedef TInteger Integer;
936  typedef typename Space::Point Point;
937  typedef typename Space::Vector Vector;
940 
950  static void
951  addEdgeConstraint( Polytope& P, unsigned int i, unsigned int j,
952  const std::vector<Point>& pts )
953  {
954  Vector ab = pts[ i ] - pts[ j ];
955  for ( int s = 0; s < 2; s++ )
956  for ( Dimension k = 0; k < dimension; ++k )
957  {
958  Vector n = ab.crossProduct( Point::base( k, (s == 0) ? 1 : -1 ) );
959  Integer b = n.dot( pts[ i ] );
960  std::size_t nb_in = 0;
961  for ( auto p : pts ) {
962  Integer v = n.dot( p );
963  if ( v < b ) nb_in++;
964  }
965  if ( nb_in == pts.size() - 2 ) {
966  P.cut( n, b, true, true );
967  }
968  }
969  }
974  static
975  Vector crossProduct( const Vector& v1, const Vector& v2 )
976  {
977  return v1.crossProduct( v2 );
978  }
979  };
980  }
981 
984 
991  template <typename TSpace>
992  std::ostream&
993  operator<< ( std::ostream & out,
994  const BoundedLatticePolytope<TSpace> & object );
995 
996 
1002  template <typename TSpace>
1003  BoundedLatticePolytope<TSpace>
1005  const BoundedLatticePolytope<TSpace> & P );
1006 
1007 
1015  template <typename TSpace>
1016  BoundedLatticePolytope<TSpace>
1017  operator+ ( const BoundedLatticePolytope<TSpace> & P,
1018  typename BoundedLatticePolytope<TSpace>::UnitSegment s );
1019 
1027  template <typename TSpace>
1028  BoundedLatticePolytope<TSpace>
1029  operator+ ( const BoundedLatticePolytope<TSpace> & P,
1030  typename BoundedLatticePolytope<TSpace>::UnitCell c );
1031 
1039  template <typename TSpace>
1040  BoundedLatticePolytope<TSpace>
1041  operator+ ( const BoundedLatticePolytope<TSpace> & P,
1042  typename BoundedLatticePolytope<TSpace>::RightStrictUnitSegment s );
1043 
1051  template <typename TSpace>
1052  BoundedLatticePolytope<TSpace>
1053  operator+ ( const BoundedLatticePolytope<TSpace> & P,
1054  typename BoundedLatticePolytope<TSpace>::RightStrictUnitCell c );
1055 
1063  template <typename TSpace>
1064  BoundedLatticePolytope<TSpace>
1065  operator+ ( const BoundedLatticePolytope<TSpace> & P,
1066  typename BoundedLatticePolytope<TSpace>::LeftStrictUnitSegment s );
1067 
1075  template <typename TSpace>
1076  BoundedLatticePolytope<TSpace>
1077  operator+ ( const BoundedLatticePolytope<TSpace> & P,
1078  typename BoundedLatticePolytope<TSpace>::LeftStrictUnitCell c );
1079 
1081 
1082 } // namespace DGtal
1083 
1084 
1086 // Includes inline functions.
1087 #include "BoundedLatticePolytope.ih"
1088 
1089 // //
1091 
1092 #endif // !defined BoundedLatticePolytope_h
1093 
1094 #undef BoundedLatticePolytope_RECURSES
1095 #endif // else defined(BoundedLatticePolytope_RECURSES)
DGtal::BigInteger
mpz_class BigInteger
Multi-precision integer with GMP implementation.
Definition: BasicTypes.h:79
DGtal::BoundedLatticePolytope::UnitCell::UnitCell
UnitCell(std::initializer_list< Dimension > l)
Definition: BoundedLatticePolytope.h:128
DGtal::BoundedLatticePolytope::Point
Space::Point Point
Definition: BoundedLatticePolytope.h:81
DGtal::detail::BoundedLatticePolytopeSpecializer< 3, TInteger >::Polytope
BoundedLatticePolytope< Space > Polytope
Definition: BoundedLatticePolytope.h:938
DGtal::PointVector< dim, Integer >::zero
static Self zero
Static const for zero PointVector.
Definition: PointVector.h:1595
DGtal::detail::BoundedLatticePolytopeSpecializer< 3, TInteger >::addEdgeConstraint
static void addEdgeConstraint(Polytope &P, unsigned int i, unsigned int j, const std::vector< Point > &pts)
Definition: BoundedLatticePolytope.h:951
DGtal::BoundedLatticePolytope::countBoundary
Integer countBoundary() const
DGtal::BoundedLatticePolytope::insertPoints
void insertPoints(PointSet &pts_set) const
DGtal::detail::BoundedLatticePolytopeSpecializer::addEdgeConstraint
static void addEdgeConstraint(Polytope &, unsigned int, unsigned int, const std::vector< Point > &)
Definition: BoundedLatticePolytope.h:907
DGtal::BoundedLatticePolytope::countInterior
Integer countInterior() const
DGtal::HyperRectDomain< Space >
DGtal::detail::BoundedLatticePolytopeSpecializer::Space
SpaceND< N, Integer > Space
Definition: BoundedLatticePolytope.h:888
DGtal::BoundedLatticePolytope::Self
BoundedLatticePolytope< TSpace > Self
Definition: BoundedLatticePolytope.h:78
DGtal::BoundedLatticePolytope::insertPointsByScanning
void insertPointsByScanning(PointSet &pts_set) const
DGtal::concepts::CSpace
Aim: Defines the concept describing a digital space, ie a cartesian product of integer lines.
Definition: CSpace.h:105
DGtal::BoundedLatticePolytope::countWithinByScanning
Integer countWithinByScanning(Point low, Point hi) const
DGtal::BoundedLatticePolytope::isDomainPointInside
bool isDomainPointInside(const Point &p) const
DGtal::detail::BoundedLatticePolytopeSpecializer::dimension
static const Dimension dimension
Definition: BoundedLatticePolytope.h:892
DGtal::BoundedLatticePolytope::canBeSummed
bool canBeSummed() const
max
int max(int a, int b)
Definition: testArithmeticalDSS.cpp:1108
DGtal::BoundedLatticePolytope::HalfSpace
ClosedIntegerHalfPlane< Space > HalfSpace
Definition: BoundedLatticePolytope.h:86
DGtal::BoundedLatticePolytope::myValidEdgeConstraints
bool myValidEdgeConstraints
Indicates if Minkowski sums with segments will be valid.
Definition: BoundedLatticePolytope.h:844
DGtal::Trace::error
std::ostream & error()
DGtal::BoundedLatticePolytope::D
Domain D
Tight bounded box.
Definition: BoundedLatticePolytope.h:840
DGtal::BoundedLatticePolytope::getPoints
void getPoints(std::vector< Point > &pts) const
DGtal::BoundedLatticePolytope::countUpTo
Integer countUpTo(Integer max) const
DGtal::BoundedLatticePolytope::I
std::vector< bool > I
Are inequalities large ?
Definition: BoundedLatticePolytope.h:842
DGtal::BoundedLatticePolytope::UnitSegment
Definition: BoundedLatticePolytope.h:98
DGtal::BoundedLatticePolytope::interiorPolytope
BoundedLatticePolytope interiorPolytope() const
DGtal::BoundedLatticePolytope::getKPoints
void getKPoints(std::vector< Point > &pts, const Point &alpha_shift) const
DGtal::BoundedLatticePolytope::countUpToByScanning
Integer countUpToByScanning(Integer max) const
DGtal::BoundedLatticePolytope::RightStrictUnitCell::dims
std::vector< Dimension > dims
Definition: BoundedLatticePolytope.h:154
DGtal::trace
Trace trace
Definition: Common.h:154
DGtal::Dimension
DGtal::uint32_t Dimension
Definition: Common.h:137
DGtal::detail::BoundedLatticePolytopeSpecializer::Integer
TInteger Integer
Definition: BoundedLatticePolytope.h:887
DGtal::BoundedLatticePolytope::LeftStrictUnitCell::operator<<
friend std::ostream & operator<<(std::ostream &out, const LeftStrictUnitCell &object)
Definition: BoundedLatticePolytope.h:192
DGtal::BoundedLatticePolytope::countBoundaryByScanning
Integer countBoundaryByScanning() const
DGtal::BoundedLatticePolytope::RightStrictUnitCell
Definition: BoundedLatticePolytope.h:153
DGtal::BoundedLatticePolytope::getInteriorPointsByScanning
void getInteriorPointsByScanning(std::vector< Point > &pts) const
DGtal::BoundedLatticePolytope::LeftStrictUnitCell
Definition: BoundedLatticePolytope.h:180
DGtal::detail::BoundedLatticePolytopeSpecializer
Aim: It is just a helper class for BoundedLatticePolytope to add dimension specific static methods.
Definition: BoundedLatticePolytope.h:886
DGtal::BoundedLatticePolytope::cut
unsigned int cut(Dimension k, bool pos, Integer b, bool large=true)
DGtal::BoundedLatticePolytope::clear
void clear()
Clears the polytope.
DGtal::BoundedLatticePolytope::getBoundaryPoints
void getBoundaryPoints(std::vector< Point > &pts) const
DGtal::detail::BoundedLatticePolytopeSpecializer< 3, TInteger >::Vector
Space::Vector Vector
Definition: BoundedLatticePolytope.h:937
DGtal::BoundedLatticePolytope::internalInitFromSegment3D
bool internalInitFromSegment3D(Point a, Point b)
DGtal::BoundedLatticePolytope::Vector
Space::Vector Vector
Definition: BoundedLatticePolytope.h:82
DGtal::BoundedLatticePolytope::init
void init(const Domain &domain, HalfSpaceIterator itB, HalfSpaceIterator itE, bool valid_edge_constraints=false, bool check_duplicate_constraints=false)
DGtal::BoundedLatticePolytope::selfDisplay
void selfDisplay(std::ostream &out) const
DGtal::BoundedLatticePolytope::countByScanning
Integer countByScanning() const
DGtal::operator<<
std::ostream & operator<<(std::ostream &out, const ATu0v1< TKSpace, TLinearAlgebra > &object)
DGtal::PointVector< dim, Integer >::base
static Self base(Dimension k, Component val=1)
DGtal::SpaceND
Definition: SpaceND.h:95
DGtal::detail::BoundedLatticePolytopeSpecializer< 3, TInteger >::Space
SpaceND< 3, Integer > Space
Definition: BoundedLatticePolytope.h:935
DGtal::PointVector::crossProduct
auto crossProduct(const PointVector< dim, OtherComponent, OtherStorage > &v) const -> decltype(DGtal::crossProduct(*this, v))
Cross product with a PointVector.
DGtal::BoundedLatticePolytope::countWithin
Integer countWithin(Point low, Point hi) const
DGtal::BoundedLatticePolytope::Domain
HyperRectDomain< Space > Domain
Definition: BoundedLatticePolytope.h:85
DGtal::BoundedLatticePolytope::LeftStrictUnitSegment::k
Dimension k
Definition: BoundedLatticePolytope.h:117
DGtal::BoundedLatticePolytope::isInside
bool isInside(const Point &p) const
DGtal::BoundedLatticePolytope::RightStrictUnitSegment::k
Dimension k
Definition: BoundedLatticePolytope.h:108
DGtal::operator+
Circulator< TIterator > operator+(typename IteratorCirculatorTraits< TIterator >::Difference d, Circulator< TIterator > &object)
Definition: Circulator.h:453
DGtal::BoundedLatticePolytope::BigInteger
DGtal::BigInteger BigInteger
Definition: BoundedLatticePolytope.h:88
DGtal::BoundedLatticePolytope::B
InequalityVector B
The vector B in the polytope representation .
Definition: BoundedLatticePolytope.h:838
DGtal::BoundedLatticePolytope::InequalityVector
std::vector< Integer > InequalityVector
Definition: BoundedLatticePolytope.h:84
DGtal::BoundedLatticePolytope::operator*=
Self & operator*=(Integer t)
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
DGtal::BoundedLatticePolytope::UnitSegment::k
Dimension k
Definition: BoundedLatticePolytope.h:99
DGtal::BoundedLatticePolytope::dimension
static const Dimension dimension
Definition: BoundedLatticePolytope.h:92
Domain
HyperRectDomain< Space > Domain
Definition: testSimpleRandomAccessRangeFromPoint.cpp:44
DGtal::BoundedLatticePolytope::LeftStrictUnitSegment::LeftStrictUnitSegment
LeftStrictUnitSegment(Dimension d)
Definition: BoundedLatticePolytope.h:118
DGtal::BoundedLatticePolytope::LeftStrictUnitSegment
Definition: BoundedLatticePolytope.h:116
DGtal::BoundedLatticePolytope::closurePolytope
BoundedLatticePolytope closurePolytope() const
DGtal::BoundedLatticePolytope::internalInitFromTriangle3D
bool internalInitFromTriangle3D(Point a, Point b, Point c)
DGtal::detail::BoundedLatticePolytopeSpecializer::crossProduct
static Vector crossProduct(const Vector &, const Vector &)
Definition: BoundedLatticePolytope.h:917
DGtal::SpaceND::dimension
static const Dimension dimension
static constants to store the dimension.
Definition: SpaceND.h:132
DGtal::BoundedLatticePolytope::getBoundaryPointsByScanning
void getBoundaryPointsByScanning(std::vector< Point > &pts) const
DGtal::BoundedLatticePolytope::~BoundedLatticePolytope
~BoundedLatticePolytope()=default
DGtal::detail::BoundedLatticePolytopeSpecializer< 3, TInteger >::Point
Space::Point Point
Definition: BoundedLatticePolytope.h:936
DGtal::BoundedLatticePolytope::getInteriorPoints
void getInteriorPoints(std::vector< Point > &pts) const
DGtal::detail::BoundedLatticePolytopeSpecializer::Point
Space::Point Point
Definition: BoundedLatticePolytope.h:889
DGtal::BoundedLatticePolytope::operator=
Self & operator=(const Self &other)=default
DGtal::BoundedLatticePolytope::insertKPoints
void insertKPoints(PointSet &pts_set, const Point &alpha_shift) const
DGtal::BoundedLatticePolytope::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((concepts::CSpace< TSpace >))
Vector
FreemanChain< int >::Vector Vector
Definition: testCombinDSS.cpp:60
DGtal::BoundedLatticePolytope::count
Integer count() const
Integer
Point::Coordinate Integer
Definition: examplePlaneProbingParallelepipedEstimator.cpp:44
DGtal::ClosedIntegerHalfPlane
Aim: A half-space specified by a vector N and a constant c. The half-space is the set .
Definition: ClosedIntegerHalfPlane.h:63
DGtal::BoundedLatticePolytope::swap
void swap(BoundedLatticePolytope &other)
DGtal::BoundedLatticePolytope::RightStrictUnitCell::operator<<
friend std::ostream & operator<<(std::ostream &out, const RightStrictUnitCell &object)
Definition: BoundedLatticePolytope.h:165
DGtal::BoundedLatticePolytope::nbHalfSpaces
unsigned int nbHalfSpaces() const
DGtal::BoundedLatticePolytope::isValid
bool isValid() const
DGtal::BoundedLatticePolytope::isInterior
bool isInterior(const Point &p) const
DGtal::detail::BoundedLatticePolytopeSpecializer< 3, TInteger >::crossProduct
static Vector crossProduct(const Vector &v1, const Vector &v2)
Definition: BoundedLatticePolytope.h:975
DGtal::detail::BoundedLatticePolytopeSpecializer::Polytope
BoundedLatticePolytope< Space > Polytope
Definition: BoundedLatticePolytope.h:891
DGtal::BoundedLatticePolytope::isLarge
bool isLarge(unsigned int i) const
domain
Domain domain
Definition: testProjection.cpp:88
DGtal::BoundedLatticePolytope::countInteriorByScanning
Integer countInteriorByScanning() const
DGtal::PointVector
Aim: Implements basic operations that will be used in Point and Vector classes.
Definition: PointVector.h:165
DGtal::detail::BoundedLatticePolytopeSpecializer::Vector
Space::Vector Vector
Definition: BoundedLatticePolytope.h:890
DGtal::BoundedLatticePolytope::Space
TSpace Space
Definition: BoundedLatticePolytope.h:79
DGtal::BoundedLatticePolytope::getI
const std::vector< bool > & getI() const
DGtal::BoundedLatticePolytope::getDomain
const Domain & getDomain() const
DGtal::operator*
KForm< Calculus, order, duality > operator*(const typename Calculus::Scalar &scalar, const KForm< Calculus, order, duality > &form)
DGtal::BoundedLatticePolytope::UnitSegment::UnitSegment
UnitSegment(Dimension d)
Definition: BoundedLatticePolytope.h:100
DGtal::BoundedLatticePolytope
Aim: Represents an nD lattice polytope, i.e. a convex polyhedron bounded with vertices with integer c...
Definition: BoundedLatticePolytope.h:73
DGtal::BoundedLatticePolytope::UnitCell
Definition: BoundedLatticePolytope.h:126
DGtal::int64_t
boost::int64_t int64_t
signed 94-bit integer.
Definition: BasicTypes.h:74
DGtal::BoundedLatticePolytope::UnitCell::dims
std::vector< Dimension > dims
Definition: BoundedLatticePolytope.h:127
DGtal::BoundedLatticePolytope::getA
const InequalityMatrix & getA() const
DGtal::BoundedLatticePolytope::A
InequalityMatrix A
The matrix A in the polytope representation .
Definition: BoundedLatticePolytope.h:836
DGtal::BoundedLatticePolytope::internalInitFromSegment2D
bool internalInitFromSegment2D(Point a, Point b)
DGtal::BoundedLatticePolytope::BoundedLatticePolytope
BoundedLatticePolytope()=default
DGtal::BoundedLatticePolytope::className
std::string className() const
DGtal::BoundedLatticePolytope::isBoundary
bool isBoundary(const Point &p) const
DGtal::BoundedLatticePolytope::operator+=
Self & operator+=(UnitSegment s)
DGtal::detail::BoundedLatticePolytopeSpecializer< 3, TInteger >::Integer
TInteger Integer
Definition: BoundedLatticePolytope.h:934
DGtal::BoundedLatticePolytope::RightStrictUnitCell::RightStrictUnitCell
RightStrictUnitCell(std::initializer_list< Dimension > l)
Definition: BoundedLatticePolytope.h:155
DGtal::BoundedLatticePolytope::InequalityMatrix
std::vector< Vector > InequalityMatrix
Definition: BoundedLatticePolytope.h:83
DGtal::BoundedLatticePolytope::getB
const InequalityVector & getB() const
Point
MyPointD Point
Definition: testClone2.cpp:383
DGtal::BoundedLatticePolytope::LeftStrictUnitCell::LeftStrictUnitCell
LeftStrictUnitCell(std::initializer_list< Dimension > l)
Definition: BoundedLatticePolytope.h:182
DGtal::BoundedLatticePolytope::UnitCell::operator<<
friend std::ostream & operator<<(std::ostream &out, const UnitCell &object)
Definition: BoundedLatticePolytope.h:138
DGtal::BoundedLatticePolytope::RightStrictUnitSegment
Definition: BoundedLatticePolytope.h:107
DGtal::SpaceND::Integer
TInteger Integer
Arithmetic ring induced by (+,-,*) and Integer numbers.
Definition: SpaceND.h:102
DGtal::BoundedLatticePolytope::Integer
Space::Integer Integer
Definition: BoundedLatticePolytope.h:80
DGtal::BoundedLatticePolytope::RightStrictUnitSegment::RightStrictUnitSegment
RightStrictUnitSegment(Dimension d)
Definition: BoundedLatticePolytope.h:109
DGtal::BoundedLatticePolytope::getPointsByScanning
void getPointsByScanning(std::vector< Point > &pts) const
DGtal::BoundedLatticePolytope::LeftStrictUnitCell::dims
std::vector< Dimension > dims
Definition: BoundedLatticePolytope.h:181