#include <vector-fraction.h>
Public Types | |
typedef Domain::Element | Element |
typedef std::pair< Element, Element > | Fraction |
typedef std::vector< Fraction > | FVector |
typedef Vector< Domain >::Dense | Vector |
Public Methods | |
VectorFraction (const Domain &D, FVector &frac) | |
VectorFraction (const Domain &D, size_t n) | |
VectorFraction (const VectorFraction< Domain > &VF) | |
void | copy (const VectorFraction< Domain > &VF) |
void | clearAndResize (size_t size) |
bool | combineSolution (const VectorFraction< Domain > &other) |
bool | boundedCombineSolution (const VectorFraction< Domain > &other, const Element &denBound, Element &g) |
bool | combineCertificate (const VectorFraction< Domain > &other, Element &n1, Element &d1, const Element &n2, const Element d2) |
VectorFraction< Domain > & | axpyin (Element &a, const VectorFraction< Domain > &x) |
std::ostream & | write (std::ostream &os) const |
FVector & | toFVector (FVector &result) const |
VectorFraction< Domain > & | simplify () |
Public Attributes | |
Vector | numer |
Element | denom |
const Domain & | _D |
Element | zero |
|
|
|
|
|
|
|
|
|
constructor from vector of rational numbers reduces individual pairs in-place first unless alreadyReduced=true |
|
allocating constructor, returns [0, 0, ... 0]/1 |
|
copy constructor |
|
this += a * x. performs a rational axpy with an integer multiplier returns (*this) |
|
Adds in-place to *this a multiple of other such that the result has gcd(denominator, denBound) == gcd(this->denom, other.denom, denBound) see Mulders+Storjohann : 'Certified Dense Linear System Solving' Lemma 6.1 return value of true means that there was some improvement (ie gcd(denom, denBound) was reduced) g is gcd(denom, denBound), and is updated by this function when there is improvement |
|
clear and resize without construction |
|
Adds in-place to *this a multiple of other to create an improved certificate ("z") n1/d1 = *this . b, n2/d2 = other . b in reduced form n1/d1 are updated so that new denominator is lcm(d1, d2); see Mulders+Storjohann : 'Certified Dense Linear System Solving' Lemma 6.2 return value of true means that there was some improvement (ie d1 was increased) |
|
Replaces *this with a linear combination of *this and other such that the result has denominator == gcd(this->denom, other.denom) see Mulders+Storjohann : 'Certified Dense Linear System Solving' Lemma 2.1 return value of true means that there was some improvement (ie denom was reduced) |
|
copy without construction |
|
reduces to simplest form, returns (*this) |
|
convert to 'answer' type of lifting container |
|
write to a stream |
|
|
|
|
|
|
|
|