ratrecon.cpp
Go to the documentation of this file.
48 /** this reconstruction routine will set x equal to the mpq vector where each component is the best rational 49 * approximation of xnum / denom with where the GCD of denominators of x is at most Dbound; it will return true on 50 * success and false if more accuracy is required: specifically if componentwise rational reconstruction does not 53 static int Reconstruct(VectorRational& resvec, mpz_t* xnum, mpz_t denom, int dim, const Rational& denomBoundSquared, const DIdxSet* indexSet = 0) 76 mpz_set_q(Dbound, denomBoundSquared.getMpqRef()); /* this is the working bound on the denominator size */ 83 MSG_DEBUG( std::cout << "reconstructing " << dim << " dimensional vector with denominator bound " << mpz_get_str(0, 10, Dbound) << "\n" ); 85 /* if Dbound is below 2^24 increase it to this value, this avoids changing input vectors that have low denominator 202 MSG_DEBUG( std::cout << "terminating with gcd " << &gcd << " exceeding Dbound " << &Dbound << "\n" ); 228 bool reconstructVector(VectorRational& input, const Rational& denomBoundSquared, const DIdxSet* indexSet)
bool getSlacks(VectorBase< R > &vector) const gets the vector of slack values if available; returns true on success Definition: solbase.h:66 void reDim(int newdim, const bool setZero=true) Resets DVectorBase's dimension to newdim. Definition: dvectorbase.h:249 Dense vector.Class VectorBase provides dense linear algebra vectors. It does not provide memory manag... Definition: dsvectorbase.h:28 Wrapper for GMP type mpq_class.We wrap mpq_class so that we can replace it by a double type if GMP is... Definition: rational.h:45 Rational reconstruction of solution vector. bool reconstructVector(VectorRational &input, const Rational &denomBoundSquared, const DIdxSet *indexSet) Definition: ratrecon.cpp:228 std::ostream & operator<<(std::ostream &s, const VectorBase< R > &vec) Output operator. Definition: basevectors.h:1087 bool getDual(VectorBase< R > &vector) const gets the dual solution vector if available; returns true on success Definition: solbase.h:96 Dynamic index set.Class DIdxSet provides dynamic IdxSet in the sense, that no restrictions are posed ... Definition: didxset.h:42 Debugging, floating point type and parameter definitions. Everything should be within this namespace. bool getPrimal(VectorBase< R > &vector) const gets the primal solution vector if available; returns true on success Definition: solbase.h:57 |