Loading...
Searching...
No Matches
CFIterator Class Reference

class to iterate through CanonicalForm's More...

`#include <cf_iter.h>`

## Public Member Functions

| CFIterator ()
| CFIterator (const CFIterator &)
| CFIterator (const CanonicalForm &)
| CFIterator (const CanonicalForm &, const Variable &)
| ~CFIterator ()
CFIterator & | operator= (const CFIterator &)
CFIterator & | operator= (const CanonicalForm &)
CF_NO_INLINE CFIterator & | operator++ ()
CF_NO_INLINE CFIterator & | operator++ (int)
CF_NO_INLINE int | hasTerms () const
| check if iterator has reached the end of CanonicalForm
CF_NO_INLINE CanonicalForm | coeff () const
| get the current coefficient
CF_NO_INLINE int | exp () const
| get the current exponent
| CFIterator ()
| CFIterator (const CFIterator &)
| CFIterator (const CanonicalForm &)
| CFIterator (const CanonicalForm &, const Variable &)
| ~CFIterator ()
CFIterator & | operator= (const CFIterator &)
CFIterator & | operator= (const CanonicalForm &)
CF_NO_INLINE CFIterator & | operator++ ()
CF_NO_INLINE CFIterator & | operator++ (int)
CF_NO_INLINE int | hasTerms () const
| check if iterator has reached the end of CanonicalForm
CF_NO_INLINE CanonicalForm | coeff () const
| get the current coefficient
CF_NO_INLINE int | exp () const
| get the current exponent
| CFIterator ()
| CFIterator (const CFIterator &)
| CFIterator (const CanonicalForm &)
| CFIterator (const CanonicalForm &, const Variable &)
| ~CFIterator ()
CFIterator & | operator= (const CFIterator &)
CFIterator & | operator= (const CanonicalForm &)
CF_NO_INLINE CFIterator & | operator++ ()
CF_NO_INLINE CFIterator & | operator++ (int)
CF_NO_INLINE int | hasTerms () const
| check if iterator has reached the end of CanonicalForm
CF_NO_INLINE CanonicalForm | coeff () const
| get the current coefficient
CF_NO_INLINE int | exp () const
| get the current exponent

## Private Attributes

CanonicalForm | data
termList | cursor
bool | ispoly
bool | hasterms

## Detailed Description

class to iterate through CanonicalForm's

Note
  a (multivariate) polynomial is viewed as a univariate poly in its main variable

Definition at line 44 of file cf_iter.h.

## Constructor & Destructor Documentation

## CFIterator() [1/12]

CFIterator::CFIterator | ( |  | ) |

Definition at line 15 of file cf_iter.cc.

{
data = 0; cursor = 0;
ispoly = false; hasterms = false;
}
CFIterator::ispoly
bool ispoly
Definition cf_iter.h:48
CFIterator::data
CanonicalForm data
Definition cf_iter.h:46
CFIterator::cursor
termList cursor
Definition cf_iter.h:47
CFIterator::hasterms
bool hasterms
Definition cf_iter.h:48

## CFIterator() [2/12]

CFIterator::CFIterator | ( | const CFIterator & | i | ) |

Definition at line 21 of file cf_iter.cc.

{
data = i.data;
cursor = i.cursor;
ispoly = i.ispoly;
hasterms = i.hasterms;
}
i
int i
Definition cfEzgcd.cc:132

## CFIterator() [3/12]

CFIterator::CFIterator | ( | const CanonicalForm & | f | ) |

Definition at line 29 of file cf_iter.cc.

{
if ( f.inBaseDomain() || f.inQuotDomain() )
{
data = f; cursor = 0;
ispoly = false; hasterms = true;
}
else
{
data = f;
cursor = ((InternalPoly*)(f.value))->firstTerm;
ispoly = true; hasterms = true;
}
}
f
FILE * f
Definition checklibs.c:9

## CFIterator() [4/12]

CFIterator::CFIterator | ( | const CanonicalForm & | f,
|  | const Variable & | v )

Definition at line 44 of file cf_iter.cc.

{
ASSERT( !f.inQuotDomain(), "illegal iterator" );
ASSERT( v.level() > 0, "illegal iterator" );
if ( f.inBaseDomain() )
{
data = f; cursor = 0;
ispoly = false; hasterms = true;
}
else
{
if ( f.mvar() == v )
{
data = f;
cursor = ((InternalPoly*)(f.value))->firstTerm;
ispoly = true; hasterms = true;
}
else if ( v > f.mvar() )
{
data = f; cursor = 0;
ispoly = false; hasterms = true;
}
else
{
data = swapvar( f, v, f.mvar().next() );
if ( data.mvar() == f.mvar().next() )
{
cursor = ((InternalPoly*)(data.value))->firstTerm;
ispoly = true; hasterms = true;
}
else
{
cursor = 0;
ispoly = false; hasterms = true;
}
}
}
}
ASSERT
#define ASSERT(expression, message)
Definition cf_assert.h:99
Variable::level
int level() const
Definition factory.h:143
Variable::next
Variable next() const
Definition factory.h:146
v
const Variable & v
< [in] a sqrfree bivariate poly
Definition facBivar.h:39
swapvar
CanonicalForm FACTORY_PUBLIC swapvar(const CanonicalForm &, const Variable &, const Variable &)
swapvar() - swap variables x1 and x2 in f.
Definition cf_ops.cc:168

## ~CFIterator() [1/3]

CFIterator::~CFIterator | ( |  | ) |

Definition at line 83 of file cf_iter.cc.

{
data = 0; cursor = 0;
}

## CFIterator() [5/12]

CFIterator::CFIterator | ( |  | ) |

## CFIterator() [6/12]

CFIterator::CFIterator | ( | const CFIterator & |  | ) |

## CFIterator() [7/12]

CFIterator::CFIterator | ( | const CanonicalForm & |  | ) |

## CFIterator() [8/12]

CFIterator::CFIterator | ( | const CanonicalForm & | ,
|  | const Variable & | )

## ~CFIterator() [2/3]

CFIterator::~CFIterator | ( |  | ) |

## CFIterator() [9/12]

CFIterator::CFIterator | ( |  | ) |

## CFIterator() [10/12]

CFIterator::CFIterator | ( | const CFIterator & |  | ) |

## CFIterator() [11/12]

CFIterator::CFIterator | ( | const CanonicalForm & |  | ) |

## CFIterator() [12/12]

CFIterator::CFIterator | ( | const CanonicalForm & | ,
|  | const Variable & | )

## ~CFIterator() [3/3]

CFIterator::~CFIterator | ( |  | ) |

## Member Function Documentation

## coeff() [1/3]

CF_NO_INLINE CanonicalForm CFIterator::coeff | ( |  | ) | const

get the current coefficient

## coeff() [2/3]

CF_NO_INLINE CanonicalForm CFIterator::coeff | ( |  | ) | const

get the current coefficient

## coeff() [3/3]

CF_NO_INLINE CanonicalForm CFIterator::coeff | ( |  | ) | const

get the current coefficient

## exp() [1/3]

CF_NO_INLINE int CFIterator::exp | ( |  | ) | const

get the current exponent

## exp() [2/3]

CF_NO_INLINE int CFIterator::exp | ( |  | ) | const

get the current exponent

## exp() [3/3]

CF_NO_INLINE int CFIterator::exp | ( |  | ) | const

get the current exponent

## hasTerms() [1/3]

CF_NO_INLINE int CFIterator::hasTerms | ( |  | ) | const

check if iterator has reached the end of CanonicalForm

## hasTerms() [2/3]

CF_NO_INLINE int CFIterator::hasTerms | ( |  | ) | const

check if iterator has reached the end of CanonicalForm

## hasTerms() [3/3]

CF_NO_INLINE int CFIterator::hasTerms | ( |  | ) | const

check if iterator has reached the end of CanonicalForm

## operator++() [1/6]

CF_NO_INLINE CFIterator & CFIterator::operator++ | ( |  | ) |

## operator++() [2/6]

CF_NO_INLINE CFIterator & CFIterator::operator++ | ( |  | ) |

## operator++() [3/6]

CF_NO_INLINE CFIterator & CFIterator::operator++ | ( |  | ) |

## operator++() [4/6]

CF_NO_INLINE CFIterator & CFIterator::operator++ | ( | int |  | ) |

## operator++() [5/6]

CF_NO_INLINE CFIterator & CFIterator::operator++ | ( | int |  | ) |

## operator++() [6/6]

CF_NO_INLINE CFIterator & CFIterator::operator++ | ( | int |  | ) |

## operator=() [1/6]

CFIterator & CFIterator::operator= | ( | const CanonicalForm & | f | ) |

Definition at line 102 of file cf_iter.cc.

{
if ( f.inBaseDomain() || f.inQuotDomain() )
{
data = f; cursor = 0;
ispoly = false; hasterms = true;
}
else
{
data = f;
cursor = ((InternalPoly*)(f.value))->firstTerm;
ispoly = true; hasterms = true;
}
return *this;
}

## operator=() [2/6]

CFIterator & CFIterator::operator= | ( | const CanonicalForm & |  | ) |

## operator=() [3/6]

CFIterator & CFIterator::operator= | ( | const CanonicalForm & |  | ) |

## operator=() [4/6]

CFIterator & CFIterator::operator= | ( | const CFIterator & | i | ) |

Definition at line 89 of file cf_iter.cc.

{
if ( this != &i )
{
data = i.data;
cursor = i.cursor;
ispoly = i.ispoly;
hasterms = i.hasterms;
}
return *this;
}

## operator=() [5/6]

CFIterator & CFIterator::operator= | ( | const CFIterator & |  | ) |

## operator=() [6/6]

CFIterator & CFIterator::operator= | ( | const CFIterator & |  | ) |

## Field Documentation

## cursor

termList CFIterator::cursor

private

Definition at line 47 of file cf_iter.h.

## data

CanonicalForm CFIterator::data

private

Definition at line 46 of file cf_iter.h.

## hasterms

bool CFIterator::hasterms

private

Definition at line 48 of file cf_iter.h.

## ispoly

bool CFIterator::ispoly

private

Definition at line 48 of file cf_iter.h.

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

- factory/cf_iter.h
- factory/factory.h
- factory/include/factory/factory.h
- factory/cf_iter.cc