32#if defined(IntegerMatrixFunctions_RECURSES)
33#error Recursive header files inclusion detected in IntegerMatrixFunctions.h
36#define IntegerMatrixFunctions_RECURSES
38#if !defined IntegerMatrixFunctions_h
40#define IntegerMatrixFunctions_h
45#include "DGtal/base/Common.h"
46#include "DGtal/kernel/ArithmeticConversionTraits.h"
47#include "DGtal/arithmetic/IntegerComputer.h"
48#include "DGtal/math/linalg/SimpleMatrix.h"
60 template <
typename TComponent>
62 negate( std::vector<TComponent> &V );
72 template <
typename TComponent>
74 equals(
const std::vector<TComponent> &a,
const std::vector<TComponent> &b );
86 template <
typename T,
typename U >
88 dotProduct(
const std::vector<T>& a,
const std::vector<U>& b );
98 dotProduct(
const std::vector<BigInteger>& a,
const std::vector<double>& b );
108 dotProduct(
const std::vector<double>& a,
const std::vector<BigInteger>& b );
119 template <
typename T,
typename U >
120 std::vector< typename DGtal::ArithmeticConversionTraits<T,U>::type >
136 template <
typename T,
typename U,
typename Op2 >
137 std::vector< typename DGtal::ArithmeticConversionTraits<T,U>::type >
138 apply(
const std::vector<T>& a,
const std::vector<U>& b,
150 template <
typename T>
161 template <
typename T>
172 template <
typename T>
184 template <
typename TOutput,
typename T>
214 template <
typename TOutput,
216 typename TEuclideanRing,
239 typename TInternalNumber>
259 template <
typename TComponent,
typename TInternalNumber>
262 const std::vector< std::vector< TComponent > >& matrix );
274 template <
typename TComponent>
275 std::vector< std::vector< TComponent > >
277 const std::vector< TComponent >& c );
289 template <
typename TComponent, DGtal::Dimension TM, DGtal::Dimension TN>
290 std::vector< std::vector< TComponent > >
323 template <
typename TComponent,
typename TDouble =
long double >
324 std::vector< std::vector< TComponent > >
326 TDouble delta = 0.75 );
358 template <
typename TComponent,
typename TDouble =
long double >
361 TDouble delta = 0.75 );
371 template <
typename TComponent>
384 template <
typename TComponent>
386 extendedGcd( TComponent& x, TComponent& y, TComponent a,TComponent b );
399 template <
typename TComponent>
401 extendedGcd( std::vector<TComponent> &C,
const std::vector<TComponent> &
A );
423 template <
typename TComponent>
424 std::vector< std::vector< TComponent > >
436 template <
typename TComponent>
439 std::vector< TComponent >& v );
452 template <
typename TComponent>
463#include "DGtal/math/linalg/IntegerMatrixFunctions.ih"
470#undef IntegerMatrixFunctions_RECURSES
Aim: Implements basic operations that will be used in Point and Vector classes.
Aim: implements basic MxN Matrix services (M,N>=1).
std::vector< std::vector< TComponent > > matrixAsVectorVector(std::size_t m, std::size_t n, const std::vector< TComponent > &c)
bool shortenVectors(std::vector< TComponent > &u, std::vector< TComponent > &v)
std::vector< typename DGtal::ArithmeticConversionTraits< T, U >::type > apply(const std::vector< T > &a, const std::vector< U > &b, Op2 op2)
void getSquaredNormL2(TOutput &n, const std::vector< T > &a)
void reduceBasisWithLLL(std::vector< std::vector< TComponent > > &B, TDouble delta=0.75)
T normLoo(const std::vector< T > &a)
std::size_t shortenBasis(std::vector< std::vector< TComponent > > &B)
T squaredNormL2(const std::vector< T > &a)
bool equals(const std::vector< TComponent > &a, const std::vector< TComponent > &b)
std::vector< typename DGtal::ArithmeticConversionTraits< T, U >::type > crossProduct(const std::vector< T > &a, const std::vector< U > &b)
DGtal::ArithmeticConversionTraits< T, U >::type dotProduct(const std::vector< T > &a, const std::vector< U > &b)
std::vector< std::vector< TComponent > > computeLLLBasis(const std::vector< std::vector< TComponent > > &B, TDouble delta=0.75)
TComponent makePrimitive(std::vector< TComponent > &N)
std::vector< std::vector< TComponent > > computeOrthogonalLattice(std::vector< TComponent > N)
void negate(std::vector< TComponent > &V)
void getDeterminantBareiss(TInternalNumber &result, const SimpleMatrix< TComponent, TN, TN > &matrix)
TComponent extendedGcd(TComponent &x, TComponent &y, TComponent a, TComponent b)
T normL1(const std::vector< T > &a)
DGtal is the top-level namespace which contains all DGtal functions and types.
DGtal::uint32_t Dimension
Aim: Trait class to get result type of arithmetic binary operators between two given types.