carl  24.04
Computer ARithmetic Library
carl::Ideal< Polynomial, Datastructure, CacheSize > Class Template Reference

#include <Ideal.h>

Inheritance diagram for carl::Ideal< Polynomial, Datastructure, CacheSize >:
Collaboration diagram for carl::Ideal< Polynomial, Datastructure, CacheSize >:

Public Member Functions

 Ideal ()=default
 
 Ideal (const Polynomial &p1, const Polynomial &p2)
 
virtual ~Ideal ()=default
 
 Ideal (const Ideal &rhs)
 
Idealoperator= (const Ideal &rhs)
 
size_t addGenerator (const Polynomial &f)
 
DivisionLookupResult< Polynomial > getDivisor (const Term< typename Polynomial::CoeffType > &t) const
 
bool isDividable (const Term< typename Polynomial::CoeffType > &m)
 
size_t nrGenerators () const
 
std::vector< Polynomial > & getGenerators ()
 
const std::vector< Polynomial > & getGenerators () const
 
const Polynomial & getGenerator (size_t index) const
 
std::vector< size_t > getOrderedIndices ()
 
void eliminateGenerator (size_t index)
 
void removeEliminated ()
 Invalidates indices. More...
 
void clear ()
 
bool is_constant () const
 
bool is_linear () const
 Checks whether all polynomials occurring in this ideal are linear. More...
 
std::set< unsigned > gatherVariables () const
 Gather all variables occurring in this ideal. More...
 
void print (bool printOrigins=true, std::ostream &os=std::cout) const
 

Private Attributes

std::vector< Polynomial > mGenerators
 
sortByLeadingTerm< Polynomial > mTermOrder = sortByLeadingTerm<Polynomial>(mGenerators)
 
std::unordered_set< size_t > mEliminated
 
Datastructure< Polynomial > mDivisorLookup = Datastructure<Polynomial>(mGenerators, mEliminated, mTermOrder)
 

Friends

std::ostream & operator<< (std::ostream &os, const Ideal &rhs)
 

Detailed Description

template<class Polynomial, template< class > class Datastructure = IdealDatastructureVector, int CacheSize = 0>
class carl::Ideal< Polynomial, Datastructure, CacheSize >

Definition at line 23 of file Ideal.h.

Constructor & Destructor Documentation

◆ Ideal() [1/3]

template<class Polynomial , template< class > class Datastructure = IdealDatastructureVector, int CacheSize = 0>
carl::Ideal< Polynomial, Datastructure, CacheSize >::Ideal ( )
default

◆ Ideal() [2/3]

template<class Polynomial , template< class > class Datastructure = IdealDatastructureVector, int CacheSize = 0>
carl::Ideal< Polynomial, Datastructure, CacheSize >::Ideal ( const Polynomial &  p1,
const Polynomial &  p2 
)
inline

Definition at line 36 of file Ideal.h.

Here is the call graph for this function:

◆ ~Ideal()

template<class Polynomial , template< class > class Datastructure = IdealDatastructureVector, int CacheSize = 0>
virtual carl::Ideal< Polynomial, Datastructure, CacheSize >::~Ideal ( )
virtualdefault

◆ Ideal() [3/3]

template<class Polynomial , template< class > class Datastructure = IdealDatastructureVector, int CacheSize = 0>
carl::Ideal< Polynomial, Datastructure, CacheSize >::Ideal ( const Ideal< Polynomial, Datastructure, CacheSize > &  rhs)
inline

Definition at line 46 of file Ideal.h.

Here is the call graph for this function:

Member Function Documentation

◆ addGenerator()

template<class Polynomial , template< class > class Datastructure = IdealDatastructureVector, int CacheSize = 0>
size_t carl::Ideal< Polynomial, Datastructure, CacheSize >::addGenerator ( const Polynomial &  f)
inline

Definition at line 67 of file Ideal.h.

Here is the caller graph for this function:

◆ clear()

template<class Polynomial , template< class > class Datastructure = IdealDatastructureVector, int CacheSize = 0>
void carl::Ideal< Polynomial, Datastructure, CacheSize >::clear ( )
inline

Definition at line 145 of file Ideal.h.

◆ eliminateGenerator()

template<class Polynomial , template< class > class Datastructure = IdealDatastructureVector, int CacheSize = 0>
void carl::Ideal< Polynomial, Datastructure, CacheSize >::eliminateGenerator ( size_t  index)
inline

Definition at line 121 of file Ideal.h.

◆ gatherVariables()

template<class Polynomial , template< class > class Datastructure = IdealDatastructureVector, int CacheSize = 0>
std::set<unsigned> carl::Ideal< Polynomial, Datastructure, CacheSize >::gatherVariables ( ) const
inline

Gather all variables occurring in this ideal.

Returns

Definition at line 175 of file Ideal.h.

◆ getDivisor()

template<class Polynomial , template< class > class Datastructure = IdealDatastructureVector, int CacheSize = 0>
DivisionLookupResult<Polynomial> carl::Ideal< Polynomial, Datastructure, CacheSize >::getDivisor ( const Term< typename Polynomial::CoeffType > &  t) const
inline

Definition at line 75 of file Ideal.h.

Here is the caller graph for this function:

◆ getGenerator()

template<class Polynomial , template< class > class Datastructure = IdealDatastructureVector, int CacheSize = 0>
const Polynomial& carl::Ideal< Polynomial, Datastructure, CacheSize >::getGenerator ( size_t  index) const
inline

Definition at line 103 of file Ideal.h.

◆ getGenerators() [1/2]

template<class Polynomial , template< class > class Datastructure = IdealDatastructureVector, int CacheSize = 0>
std::vector<Polynomial>& carl::Ideal< Polynomial, Datastructure, CacheSize >::getGenerators ( )
inline

Definition at line 92 of file Ideal.h.

◆ getGenerators() [2/2]

template<class Polynomial , template< class > class Datastructure = IdealDatastructureVector, int CacheSize = 0>
const std::vector<Polynomial>& carl::Ideal< Polynomial, Datastructure, CacheSize >::getGenerators ( ) const
inline

Definition at line 97 of file Ideal.h.

◆ getOrderedIndices()

template<class Polynomial , template< class > class Datastructure = IdealDatastructureVector, int CacheSize = 0>
std::vector<size_t> carl::Ideal< Polynomial, Datastructure, CacheSize >::getOrderedIndices ( )
inline

Definition at line 108 of file Ideal.h.

◆ is_constant()

template<class Polynomial , template< class > class Datastructure = IdealDatastructureVector, int CacheSize = 0>
bool carl::Ideal< Polynomial, Datastructure, CacheSize >::is_constant ( ) const
inline

Definition at line 153 of file Ideal.h.

◆ is_linear()

template<class Polynomial , template< class > class Datastructure = IdealDatastructureVector, int CacheSize = 0>
bool carl::Ideal< Polynomial, Datastructure, CacheSize >::is_linear ( ) const
inline

Checks whether all polynomials occurring in this ideal are linear.

Returns

Definition at line 162 of file Ideal.h.

◆ isDividable()

template<class Polynomial , template< class > class Datastructure = IdealDatastructureVector, int CacheSize = 0>
bool carl::Ideal< Polynomial, Datastructure, CacheSize >::isDividable ( const Term< typename Polynomial::CoeffType > &  m)
inline

Definition at line 82 of file Ideal.h.

◆ nrGenerators()

template<class Polynomial , template< class > class Datastructure = IdealDatastructureVector, int CacheSize = 0>
size_t carl::Ideal< Polynomial, Datastructure, CacheSize >::nrGenerators ( ) const
inline

Definition at line 87 of file Ideal.h.

◆ operator=()

template<class Polynomial , template< class > class Datastructure = IdealDatastructureVector, int CacheSize = 0>
Ideal& carl::Ideal< Polynomial, Datastructure, CacheSize >::operator= ( const Ideal< Polynomial, Datastructure, CacheSize > &  rhs)
inline

Definition at line 56 of file Ideal.h.

Here is the call graph for this function:

◆ print()

template<class Polynomial , template< class > class Datastructure = IdealDatastructureVector, int CacheSize = 0>
void carl::Ideal< Polynomial, Datastructure, CacheSize >::print ( bool  printOrigins = true,
std::ostream &  os = std::cout 
) const
inline

Definition at line 209 of file Ideal.h.

◆ removeEliminated()

template<class Polynomial , template< class > class Datastructure = IdealDatastructureVector, int CacheSize = 0>
void carl::Ideal< Polynomial, Datastructure, CacheSize >::removeEliminated ( )
inline

Invalidates indices.

Returns
a vector with the new indices

Definition at line 130 of file Ideal.h.

Here is the caller graph for this function:

Friends And Related Function Documentation

◆ operator<<

template<class Polynomial , template< class > class Datastructure = IdealDatastructureVector, int CacheSize = 0>
std::ostream& operator<< ( std::ostream &  os,
const Ideal< Polynomial, Datastructure, CacheSize > &  rhs 
)
friend

Definition at line 199 of file Ideal.h.

Field Documentation

◆ mDivisorLookup

template<class Polynomial , template< class > class Datastructure = IdealDatastructureVector, int CacheSize = 0>
Datastructure<Polynomial> carl::Ideal< Polynomial, Datastructure, CacheSize >::mDivisorLookup = Datastructure<Polynomial>(mGenerators, mEliminated, mTermOrder)
private

Definition at line 31 of file Ideal.h.

◆ mEliminated

template<class Polynomial , template< class > class Datastructure = IdealDatastructureVector, int CacheSize = 0>
std::unordered_set<size_t> carl::Ideal< Polynomial, Datastructure, CacheSize >::mEliminated
private

Definition at line 30 of file Ideal.h.

◆ mGenerators

template<class Polynomial , template< class > class Datastructure = IdealDatastructureVector, int CacheSize = 0>
std::vector<Polynomial> carl::Ideal< Polynomial, Datastructure, CacheSize >::mGenerators
private

Definition at line 26 of file Ideal.h.

◆ mTermOrder

template<class Polynomial , template< class > class Datastructure = IdealDatastructureVector, int CacheSize = 0>
sortByLeadingTerm<Polynomial> carl::Ideal< Polynomial, Datastructure, CacheSize >::mTermOrder = sortByLeadingTerm<Polynomial>(mGenerators)
private

Definition at line 28 of file Ideal.h.


The documentation for this class was generated from the following file: