Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
Geom::SL Namespace Reference

Namespaces

namespace  detail
 
namespace  ordering
 

Classes

struct  coefficient
 
struct  coefficient< 0, Polynomial< CoeffT > >
 
struct  coefficient< N, Polynomial< CoeffT > >
 
class  Matrix
 
struct  monomial
 
struct  monomial< 0, CoeffT >
 
class  MultiPoly
 
struct  mvdegree
 
struct  mvdegree< N, CoeffT, ordering::lex >
 
struct  mvpoly
 
struct  mvpoly< 0, CoeffT >
 
struct  one
 
struct  one< MultiPoly< N, CoeffT >, false >
 
struct  one< Polynomial< CoeffT >, false >
 
struct  one< T, true >
 
class  Polynomial
 
struct  rank
 
struct  rank< Polynomial< CoeffT > >
 
struct  zero
 
struct  zero< MultiPoly< N, CoeffT >, false >
 
struct  zero< Polynomial< CoeffT >, false >
 
struct  zero< T, true >
 

Typedefs

typedef MultiPoly< 1, double > MVPoly1
 
typedef MultiPoly< 2, double > MVPoly2
 
typedef MultiPoly< 3, double > MVPoly3
 
typedef std::array< MVPoly1, 3 > poly_vector_type
 
typedef std::array< poly_vector_type, 2 > basis_type
 
typedef std::array< double, 3 > coeff_vector_type
 
typedef std::valarray< size_t > multi_index_type
 

Functions

template<typename Coeff >
Coeff determinant_minor (Matrix< Coeff > const &M)
 Recursive determinant for small matrices having at least one symbolic entry.
 
void make_initial_basis (basis_type &b, MVPoly1 const &p, MVPoly1 const &q)
 
void microbasis (basis_type &b, MVPoly1 const &p, MVPoly1 const &q)
 
void basis_to_poly (MVPoly3 &p0, poly_vector_type const &v)
 
Matrix< MVPoly2make_bezout_matrix (MVPoly3 const &p, MVPoly3 const &q)
 
Matrix< MVPoly2make_bezout_main_minor (MVPoly3 const &p, MVPoly3 const &q, size_t h)
 
template<typename Coeff , typename charT >
std::basic_ostream< charT > & operator<< (std::basic_ostream< charT > &os, const Matrix< Coeff > &_matrix)
 
template<size_t N, typename CoeffT , typename T >
void polynomial_matrix_evaluate (Matrix< T > &A, Matrix< MultiPoly< N, CoeffT > > const &M, std::array< T, N > const &X)
 
void polynomial_matrix_evaluate (NL::Matrix &A, Matrix< MultiPoly< 2, double > > const &M, Point const &P)
 
multi_index_type multi_index_zero (size_t N)
 
 BOOST_PP_REPEAT_FROM_TO (0, GEOM_SL_MAX_RANK, GEOM_SL_MAKE_MULTI_INDEX, unused) template< size_t N > inline multi_index_type make_multi_index(size_t i
 
multi_index_type I (N)
 
multi_index_type shift (multi_index_type const &I, size_t i=1)
 
bool is_equal (multi_index_type const &I, multi_index_type const &J)
 
template<typename charT >
std::basic_ostream< charT > & operator<< (std::basic_ostream< charT > &os, const Geom::SL::multi_index_type &I)
 
template<typename charT , size_t N, typename CoeffT >
std::basic_ostream< charT > & operator<< (std::basic_ostream< charT > &os, const MultiPoly< N, CoeffT > &p)
 
template<size_t N, typename CoeffT >
MultiPoly< N, CoeffT > operator<< (MultiPoly< N, CoeffT > const &p, multi_index_type const &I)
 
template<size_t M, size_t N, typename CoeffT >
std::enable_if_t<(M > 0) &&(M<=N), MultiPoly< N, CoeffT > > operator+ (MultiPoly< N, CoeffT > const &p, MultiPoly< M, CoeffT > const &q)
 
template<size_t M, size_t N, typename CoeffT >
std::enable_if_t<(N > 0) &&(M > N), MultiPoly< M, CoeffT > > operator+ (MultiPoly< N, CoeffT > const &p, MultiPoly< M, CoeffT > const &q)
 
template<size_t M, size_t N, typename CoeffT >
std::enable_if_t<(M > 0) &&(M<=N), MultiPoly< N, CoeffT > > operator- (MultiPoly< N, CoeffT > const &p, MultiPoly< M, CoeffT > const &q)
 
template<size_t M, size_t N, typename CoeffT >
std::enable_if_t<(N > 0) &&(M > N), MultiPoly< M, CoeffT > > operator- (MultiPoly< N, CoeffT > const &p, MultiPoly< M, CoeffT > const &q)
 
template<size_t M, size_t N, typename CoeffT >
std::enable_if_t<(M > 0) &&(M<=N), MultiPoly< N, CoeffT > > operator* (MultiPoly< N, CoeffT > const &p, MultiPoly< M, CoeffT > const &q)
 
template<size_t M, size_t N, typename CoeffT >
std::enable_if_t<(N > 0) &&(M > N), MultiPoly< M, CoeffT > > operator* (MultiPoly< N, CoeffT > const &p, MultiPoly< M, CoeffT > const &q)
 
template<size_t N, typename CoeffT >
MultiPoly< N, CoeffT > operator+ (MultiPoly< N, CoeffT > const &p, CoeffT const &c)
 
template<size_t N, typename CoeffT >
MultiPoly< N, CoeffT > operator+ (CoeffT const &c, MultiPoly< N, CoeffT > const &p)
 
template<size_t N, typename CoeffT >
MultiPoly< N, CoeffT > operator- (MultiPoly< N, CoeffT > const &p, CoeffT const &c)
 
template<size_t N, typename CoeffT >
MultiPoly< N, CoeffT > operator- (CoeffT const &c, MultiPoly< N, CoeffT > const &p)
 
template<size_t N, typename CoeffT >
MultiPoly< N, CoeffT > operator* (MultiPoly< N, CoeffT > const &p, CoeffT const &c)
 
template<size_t N, typename CoeffT >
MultiPoly< N, CoeffT > operator* (CoeffT const &c, MultiPoly< N, CoeffT > const &p)
 
template<size_t N, typename CoeffT >
MultiPoly< N, CoeffT > operator/ (MultiPoly< N, CoeffT > const &p, CoeffT const &c)
 
template<typename CoeffT >
bool operator== (Polynomial< CoeffT > const &p, Polynomial< CoeffT > const &q)
 
template<typename CoeffT >
bool operator!= (Polynomial< CoeffT > const &p, Polynomial< CoeffT > const &q)
 
template<typename CoeffT >
Polynomial< CoeffT > operator+ (Polynomial< CoeffT > const &p, Polynomial< CoeffT > const &q)
 
template<typename CoeffT >
Polynomial< CoeffT > operator- (Polynomial< CoeffT > const &p, Polynomial< CoeffT > const &q)
 
template<typename CoeffT >
Polynomial< CoeffT > operator* (Polynomial< CoeffT > const &p, Polynomial< CoeffT > const &q)
 
template<typename CoeffT >
Polynomial< CoeffT > operator<< (Polynomial< CoeffT > const &p, size_t n)
 
template<typename CoeffT >
Polynomial< CoeffT > operator+ (Polynomial< CoeffT > const &p, CoeffT const &c)
 
template<typename CoeffT >
Polynomial< CoeffT > operator+ (CoeffT const &c, Polynomial< CoeffT > const &p)
 
template<typename CoeffT >
Polynomial< CoeffT > operator- (Polynomial< CoeffT > const &p, CoeffT const &c)
 
template<typename CoeffT >
Polynomial< CoeffT > operator- (CoeffT const &c, Polynomial< CoeffT > const &p)
 
template<typename CoeffT >
Polynomial< CoeffT > operator* (Polynomial< CoeffT > const &p, CoeffT const &c)
 
template<typename CoeffT >
Polynomial< CoeffT > operator* (CoeffT const &c, Polynomial< CoeffT > const &p)
 
template<typename charT , typename CoeffT >
std::basic_ostream< charT > & operator<< (std::basic_ostream< charT > &os, const Polynomial< CoeffT > &p)
 

Variables

size_t v
 
 I [i] = v
 

Typedef Documentation

◆ basis_type

typedef std::array<poly_vector_type, 2> Geom::SL::basis_type

Definition at line 54 of file implicit.h.

◆ coeff_vector_type

typedef std::array<double, 3> Geom::SL::coeff_vector_type

Definition at line 55 of file implicit.h.

◆ multi_index_type

typedef std::valarray<size_t> Geom::SL::multi_index_type

Definition at line 85 of file multi-index.h.

◆ MVPoly1

typedef MultiPoly<1, double> Geom::SL::MVPoly1

Definition at line 50 of file implicit.h.

◆ MVPoly2

typedef MultiPoly<2, double> Geom::SL::MVPoly2

Definition at line 51 of file implicit.h.

◆ MVPoly3

typedef MultiPoly<3, double> Geom::SL::MVPoly3

Definition at line 52 of file implicit.h.

◆ poly_vector_type

typedef std::array<MVPoly1, 3> Geom::SL::poly_vector_type

Definition at line 53 of file implicit.h.

Function Documentation

◆ basis_to_poly()

void Geom::SL::basis_to_poly ( MVPoly3 p0,
poly_vector_type const &  v 
)
inline

Definition at line 226 of file implicit.h.

References Geom::SL::detail::poly1_to_poly3(), and v.

◆ BOOST_PP_REPEAT_FROM_TO()

Geom::SL::BOOST_PP_REPEAT_FROM_TO ( ,
GEOM_SL_MAX_RANK  ,
GEOM_SL_MAKE_MULTI_INDEX  ,
unused   
)

◆ determinant_minor()

template<typename Coeff >
Coeff Geom::SL::determinant_minor ( Matrix< Coeff > const &  M)

Recursive determinant for small matrices having at least one symbolic entry.

The basic algorithm, known as Laplace-expansion, is enhanced by some bookkeeping to avoid calculation of the same submatrices ("minors") more than once. According to W.M.Gentleman and S.C.Johnson this algorithm is better than elimination schemes for matrices of sparse multivariate polynomials and also for matrices of dense univariate polynomials if the matrix' dimesion is larger than 7.

Returns
the determinant as a new expression (in expanded form)
See also
matrix::determinant()

Definition at line 45 of file determinant-minor.h.

References c, Geom::SL::Matrix< Coeff >::columns(), Geom::det(), and Geom::SL::Matrix< Coeff >::rows().

◆ I()

multi_index_type Geom::SL::I ( N  )

◆ is_equal()

bool Geom::SL::is_equal ( multi_index_type const &  I,
multi_index_type const &  J 
)
inline

Definition at line 126 of file multi-index.h.

References I.

◆ make_bezout_main_minor()

Matrix< MVPoly2 > Geom::SL::make_bezout_main_minor ( MVPoly3 const &  p,
MVPoly3 const &  q,
size_t  h 
)

◆ make_bezout_matrix()

Matrix< MVPoly2 > Geom::SL::make_bezout_matrix ( MVPoly3 const &  p,
MVPoly3 const &  q 
)

◆ make_initial_basis()

void Geom::SL::make_initial_basis ( basis_type b,
MVPoly1 const &  p,
MVPoly1 const &  q 
)
inline

Definition at line 116 of file implicit.h.

Referenced by microbasis().

◆ microbasis()

void Geom::SL::microbasis ( basis_type b,
MVPoly1 const &  p,
MVPoly1 const &  q 
)
inline

◆ multi_index_zero()

◆ operator!=()

template<typename CoeffT >
bool Geom::SL::operator!= ( Polynomial< CoeffT > const &  p,
Polynomial< CoeffT > const &  q 
)
inline

Definition at line 417 of file polynomial.h.

◆ operator*() [1/7]

template<size_t N, typename CoeffT >
MultiPoly< N, CoeffT > Geom::SL::operator* ( CoeffT const &  c,
MultiPoly< N, CoeffT > const &  p 
)
inline

Definition at line 601 of file multipoly.h.

References c.

◆ operator*() [2/7]

template<typename CoeffT >
Polynomial< CoeffT > Geom::SL::operator* ( CoeffT const &  c,
Polynomial< CoeffT > const &  p 
)
inline

Definition at line 515 of file polynomial.h.

References c.

◆ operator*() [3/7]

template<size_t N, typename CoeffT >
MultiPoly< N, CoeffT > Geom::SL::operator* ( MultiPoly< N, CoeffT > const &  p,
CoeffT const &  c 
)
inline

Definition at line 592 of file multipoly.h.

References c.

◆ operator*() [4/7]

template<size_t M, size_t N, typename CoeffT >
std::enable_if_t<(M > 0) &&(M<=N), MultiPoly< N, CoeffT > > Geom::SL::operator* ( MultiPoly< N, CoeffT > const &  p,
MultiPoly< M, CoeffT > const &  q 
)
inline

Definition at line 531 of file multipoly.h.

◆ operator*() [5/7]

template<size_t M, size_t N, typename CoeffT >
std::enable_if_t<(N > 0) &&(M > N), MultiPoly< M, CoeffT > > Geom::SL::operator* ( MultiPoly< N, CoeffT > const &  p,
MultiPoly< M, CoeffT > const &  q 
)
inline

Definition at line 542 of file multipoly.h.

◆ operator*() [6/7]

template<typename CoeffT >
Polynomial< CoeffT > Geom::SL::operator* ( Polynomial< CoeffT > const &  p,
CoeffT const &  c 
)
inline

Definition at line 505 of file polynomial.h.

References c.

◆ operator*() [7/7]

template<typename CoeffT >
Polynomial< CoeffT > Geom::SL::operator* ( Polynomial< CoeffT > const &  p,
Polynomial< CoeffT > const &  q 
)
inline

Definition at line 445 of file polynomial.h.

◆ operator+() [1/7]

template<size_t N, typename CoeffT >
MultiPoly< N, CoeffT > Geom::SL::operator+ ( CoeffT const &  c,
MultiPoly< N, CoeffT > const &  p 
)
inline

Definition at line 565 of file multipoly.h.

References c.

◆ operator+() [2/7]

template<typename CoeffT >
Polynomial< CoeffT > Geom::SL::operator+ ( CoeffT const &  c,
Polynomial< CoeffT > const &  p 
)
inline

Definition at line 479 of file polynomial.h.

References c.

◆ operator+() [3/7]

template<size_t N, typename CoeffT >
MultiPoly< N, CoeffT > Geom::SL::operator+ ( MultiPoly< N, CoeffT > const &  p,
CoeffT const &  c 
)
inline

Definition at line 556 of file multipoly.h.

References c.

◆ operator+() [4/7]

template<size_t M, size_t N, typename CoeffT >
std::enable_if_t<(M > 0) &&(M<=N), MultiPoly< N, CoeffT > > Geom::SL::operator+ ( MultiPoly< N, CoeffT > const &  p,
MultiPoly< M, CoeffT > const &  q 
)
inline

Definition at line 486 of file multipoly.h.

◆ operator+() [5/7]

template<size_t M, size_t N, typename CoeffT >
std::enable_if_t<(N > 0) &&(M > N), MultiPoly< M, CoeffT > > Geom::SL::operator+ ( MultiPoly< N, CoeffT > const &  p,
MultiPoly< M, CoeffT > const &  q 
)
inline

Definition at line 497 of file multipoly.h.

◆ operator+() [6/7]

template<typename CoeffT >
Polynomial< CoeffT > Geom::SL::operator+ ( Polynomial< CoeffT > const &  p,
CoeffT const &  c 
)
inline

Definition at line 469 of file polynomial.h.

References c.

◆ operator+() [7/7]

template<typename CoeffT >
Polynomial< CoeffT > Geom::SL::operator+ ( Polynomial< CoeffT > const &  p,
Polynomial< CoeffT > const &  q 
)
inline

Definition at line 425 of file polynomial.h.

◆ operator-() [1/7]

template<size_t N, typename CoeffT >
MultiPoly< N, CoeffT > Geom::SL::operator- ( CoeffT const &  c,
MultiPoly< N, CoeffT > const &  p 
)
inline

Definition at line 583 of file multipoly.h.

References c.

◆ operator-() [2/7]

template<typename CoeffT >
Polynomial< CoeffT > Geom::SL::operator- ( CoeffT const &  c,
Polynomial< CoeffT > const &  p 
)
inline

Definition at line 497 of file polynomial.h.

References c.

◆ operator-() [3/7]

template<size_t N, typename CoeffT >
MultiPoly< N, CoeffT > Geom::SL::operator- ( MultiPoly< N, CoeffT > const &  p,
CoeffT const &  c 
)
inline

Definition at line 574 of file multipoly.h.

References c.

◆ operator-() [4/7]

template<size_t M, size_t N, typename CoeffT >
std::enable_if_t<(M > 0) &&(M<=N), MultiPoly< N, CoeffT > > Geom::SL::operator- ( MultiPoly< N, CoeffT > const &  p,
MultiPoly< M, CoeffT > const &  q 
)
inline

Definition at line 508 of file multipoly.h.

◆ operator-() [5/7]

template<size_t M, size_t N, typename CoeffT >
std::enable_if_t<(N > 0) &&(M > N), MultiPoly< M, CoeffT > > Geom::SL::operator- ( MultiPoly< N, CoeffT > const &  p,
MultiPoly< M, CoeffT > const &  q 
)
inline

Definition at line 519 of file multipoly.h.

◆ operator-() [6/7]

template<typename CoeffT >
Polynomial< CoeffT > Geom::SL::operator- ( Polynomial< CoeffT > const &  p,
CoeffT const &  c 
)
inline

Definition at line 487 of file polynomial.h.

References c.

◆ operator-() [7/7]

template<typename CoeffT >
Polynomial< CoeffT > Geom::SL::operator- ( Polynomial< CoeffT > const &  p,
Polynomial< CoeffT > const &  q 
)
inline

Definition at line 435 of file polynomial.h.

◆ operator/()

template<size_t N, typename CoeffT >
MultiPoly< N, CoeffT > Geom::SL::operator/ ( MultiPoly< N, CoeffT > const &  p,
CoeffT const &  c 
)
inline

Definition at line 611 of file multipoly.h.

References c.

◆ operator<<() [1/6]

template<size_t N, typename CoeffT >
MultiPoly< N, CoeffT > Geom::SL::operator<< ( MultiPoly< N, CoeffT > const &  p,
multi_index_type const &  I 
)
inline

Definition at line 451 of file multipoly.h.

◆ operator<<() [2/6]

template<typename CoeffT >
Polynomial< CoeffT > Geom::SL::operator<< ( Polynomial< CoeffT > const &  p,
size_t  n 
)
inline

Definition at line 445 of file polynomial.h.

◆ operator<<() [3/6]

template<typename charT >
std::basic_ostream< charT > & Geom::SL::operator<< ( std::basic_ostream< charT > &  os,
const Geom::SL::multi_index_type I 
)
inline

Definition at line 126 of file multi-index.h.

◆ operator<<() [4/6]

template<typename Coeff , typename charT >
std::basic_ostream< charT > & Geom::SL::operator<< ( std::basic_ostream< charT > &  os,
const Matrix< Coeff > &  _matrix 
)
inline

Definition at line 1 of file matrix.h.

◆ operator<<() [5/6]

template<typename charT , size_t N, typename CoeffT >
std::basic_ostream< charT > & Geom::SL::operator<< ( std::basic_ostream< charT > &  os,
const MultiPoly< N, CoeffT > &  p 
)
inline

Definition at line 451 of file multipoly.h.

References Geom::operator<<().

◆ operator<<() [6/6]

template<typename charT , typename CoeffT >
std::basic_ostream< charT > & Geom::SL::operator<< ( std::basic_ostream< charT > &  os,
const Polynomial< CoeffT > &  p 
)
inline

Definition at line 515 of file polynomial.h.

◆ operator==()

template<typename CoeffT >
bool Geom::SL::operator== ( Polynomial< CoeffT > const &  p,
Polynomial< CoeffT > const &  q 
)
inline

◆ polynomial_matrix_evaluate() [1/2]

template<size_t N, typename CoeffT , typename T >
void Geom::SL::polynomial_matrix_evaluate ( Matrix< T > &  A,
Matrix< MultiPoly< N, CoeffT > > const &  M,
std::array< T, N > const &  X 
)

Definition at line 135 of file matrix.h.

References Geom::SL::Matrix< Coeff >::resize(), and Geom::X.

◆ polynomial_matrix_evaluate() [2/2]

void Geom::SL::polynomial_matrix_evaluate ( NL::Matrix A,
Matrix< MultiPoly< 2, double > > const &  M,
Point const &  P 
)
inline

Definition at line 151 of file matrix.h.

References Geom::X, and Geom::Y.

◆ shift()

multi_index_type Geom::SL::shift ( multi_index_type const &  I,
size_t  i = 1 
)
inline

Definition at line 117 of file multi-index.h.

References I, and N.

Referenced by Geom::SL::coefficient< N, Polynomial< CoeffT > >::set_safe_impl().

Variable Documentation

◆ I

return Geom::SL::I = v

Definition at line 110 of file multi-index.h.

Referenced by Geom::SL::MultiPoly< N, CoeffT >::coefficient(), Geom::SL::MultiPoly< N, CoeffT >::coefficient(), Geom::SL::coefficient< N, Polynomial< CoeffT > >::get(), Geom::SL::coefficient< 0, Polynomial< CoeffT > >::get(), Geom::SL::coefficient< N, Polynomial< CoeffT > >::get(), Geom::SL::coefficient< 0, Polynomial< CoeffT > >::get(), Geom::SL::coefficient< N, Polynomial< CoeffT > >::get_impl(), Geom::SL::coefficient< 0, Polynomial< CoeffT > >::get_impl(), Geom::SL::coefficient< N, Polynomial< CoeffT > >::get_impl(), Geom::SL::coefficient< 0, Polynomial< CoeffT > >::get_impl(), Geom::SL::coefficient< N, Polynomial< CoeffT > >::get_safe(), Geom::SL::coefficient< 0, Polynomial< CoeffT > >::get_safe(), Geom::SL::coefficient< N, Polynomial< CoeffT > >::get_safe_impl(), Geom::SL::coefficient< 0, Polynomial< CoeffT > >::get_safe_impl(), is_equal(), Geom::SL::monomial< N, CoeffT >::make(), Geom::SL::monomial< N, CoeffT >::make_impl(), Geom::SL::mvpoly< N, CoeffT >::max_degree(), Geom::SL::mvpoly< N, CoeffT >::max_degree_impl(), Geom::SL::MultiPoly< N, CoeffT >::MultiPoly(), Geom::SL::MultiPoly< N, CoeffT >::operator()(), Geom::SL::MultiPoly< N, CoeffT >::operator()(), Geom::SL::MultiPoly< N, CoeffT >::operator+=(), Geom::SL::MultiPoly< N, CoeffT >::operator-=(), Geom::SL::MultiPoly< N, CoeffT >::operator<<=(), Geom::SL::MultiPoly< N, CoeffT >::operator=(), Geom::SL::detail::poly1_to_poly3(), Geom::SL::mvpoly< N, CoeffT >::real_degree(), Geom::SL::mvpoly< N, CoeffT >::real_degree_impl(), Geom::SL::MultiPoly< N, CoeffT >::select(), Geom::SL::coefficient< N, Polynomial< CoeffT > >::set_safe(), Geom::SL::coefficient< 0, Polynomial< CoeffT > >::set_safe(), Geom::SL::coefficient< N, Polynomial< CoeffT > >::set_safe_impl(), Geom::SL::coefficient< 0, Polynomial< CoeffT > >::set_safe_impl(), shift(), Geom::SL::mvpoly< N, CoeffT >::shift(), and Geom::SL::mvpoly< N, CoeffT >::shift_impl().

◆ v

size_t Geom::SL::v
Initial value:
{
if (!(i < N))
THROW_RANGEERROR ("make_multi_index<N> from a single index: "
"out of range position")
size_t N

Definition at line 104 of file multi-index.h.

Referenced by basis_to_poly(), and make_bezout_main_minor().