|
SoPlex Doxygen Documentation
|
Dense vectorClass Vector provides dense linear algebra vectors. It does not provide memory management for the array of values. Instead, the constructor requires a pointer to a memory block large enough to fit the desired dimension of Real values.
More...
#include <vector.h>
|
|
| Vector () |
| we have no default constructor.
|
|
Dense vector
Class Vector provides dense linear algebra vectors. It does not provide memory management for the array of values. Instead, the constructor requires a pointer to a memory block large enough to fit the desired dimension of Real values.
After construction, the values of a Vector can be accessed with the subscript operator[]() . Safety is provided by
- checking of array bound when accessing elements with the subscript operator[]() (only when compiled without
-DNDEBUG ).
A Vector is distinguished from a simple array of Reals by providing a set of mathematical operations. Since Vector does not provide any memory management features, no operations are available that would require allocation of temporary memory space.
The following mathematical operations are provided by class Vector (Vector a , b ; Real x ):
When using any of these operations, the vectors involved must be of the same dimension. Also an SVector b is allowed if it does not contain nonzeros with index greater than the dimension of a .
Definition at line 82 of file vector.h.
construction
There is no default constructor since the storage for a Vector must be provided externally. Storage must be passed as a memory block val at construction. It must be large enough to fit at least dimen Real values.
Definition at line 109 of file vector.h.
References Vector::dimen, and Vector::isConsistent().
set vector to 0.
Definition at line 259 of file vector.h.
References Vector::dimen, and Vector::val.
Referenced by SLUFactor::clear(), UpdateVector::clear(), SSVector::clear(), SPxSolver::clear(), SPxSolver::computeFrhs(), SPxBoundFlippingRT::flipAndUpdate(), SPxSolver::getDual(), SPxSolver::getDualfarkas(), SPxSolver::getPrimalray(), SPxSolver::getRedCost(), SPxSteepPR::load(), SPxBasis::multBaseWith(), Vector::operator=(), SLUFactor::operator=(), print_solution_and_status(), SPxSteepPR::setRep(), SPxSteepPR::setType(), SPxSumST::setupWeights(), SLUFactor::solve2right4update(), SLUFactor::solve3right4update(), SLUFactor::solveLeft(), SSVector::SSVector(), and SPxSolver::testVecs().
dimension of vector
Definition at line 153 of file vector.h.
References Vector::dimen.
Referenced by LPColSet::add(), LPRowSet::add(), SPxDevexPR::addedCoVecs(), SPxWeightPR::addedCoVecs(), SPxSteepPR::addedCoVecs(), SPxDevexPR::addedVecs(), SPxWeightPR::addedVecs(), SPxSteepPR::addedVecs(), Vector::assign(), SSVector::assign(), SPxLP::changeLhs(), SPxLP::changeLower(), SPxSolver::changeLower(), SPxLP::changeObj(), SPxLP::changeRhs(), SPxLP::changeUpper(), SPxSolver::changeUpper(), LPColSet::create(), LPRowSet::create(), DSVector::DSVector(), DVector::DVector(), DVector_exact::DVector_exact(), SPxWeightST::generate(), SPxDevexPR::init(), SPxDevexPR::isConsistent(), SPxWeightPR::isConsistent(), UpdateVector::isConsistent(), Vector::isConsistent(), SSVector::isConsistent(), LPColSet::isConsistent(), LPRowSet::isConsistent(), SPxSolver::isConsistent(), Vector::maxAbs(), SPxFastRT::maxDelta(), Vector::minAbs(), SPxFastRT::minDelta(), Vector::multAdd(), SPxBasis::multBaseWith(), SPxBasis::multWithBase(), soplex::operator*(), Vector::operator*(), Vector::operator*=(), soplex::operator+(), Vector_exact::operator+=(), Vector::operator+=(), soplex::operator-(), Vector_exact::operator-=(), Vector::operator-=(), soplex::operator<<(), Vector_exact::operator=(), DVector_exact::operator=(), Vector::operator=(), DSVector::operator=(), DVector::operator=(), SVector::operator=(), soplex::operator>>(), SPxSolver::perturbMax(), SPxSolver::perturbMin(), SPxWeightPR::removedCoVec(), SPxSteepPR::removedCoVec(), SPxWeightPR::removedCoVecs(), SPxSteepPR::removedCoVecs(), SPxWeightPR::removedVec(), SPxSteepPR::removedVec(), SPxWeightPR::removedVecs(), SPxSteepPR::removedVecs(), DVector::reSize(), SPxDevexPR::selectEnterDenseCoDim(), SPxDevexPR::selectEnterDenseDim(), SPxDevexPR::selectEnterSparseCoDim(), SPxDevexPR::selectEnterSparseDim(), SPxDevexPR::selectLeavePart(), SPxDevexPR::selectLeaveX(), SPxSteepPR::setRep(), SPxSolver::setupPupdate(), SPxVectorST::setupWeights(), SPxWeightST::setupWeights(), SSVector::setValue(), SSVector::SSVector(), SPxScaler::unscaleDual(), SPxScaler::unscalePrimal(), SPxScaler::unscaleRedCost(), SPxScaler::unscaleSlacks(), and SPxMainSM::unsimplify().
const Real* get_const_ptr |
( |
| ) |
const |
Conversion to C-style pointer.
This function serves for using a Vector in an C-style function. It returns a pointer to the first value of the array.
Definition at line 248 of file vector.h.
References Vector::val.
Referenced by SPxSteepPR::entered4(), SPxSteepPR::left4(), SPxFastRT::maxDelta(), SPxFastRT::maxSelect(), SPxFastRT::minDelta(), SPxFastRT::minSelect(), SPxWeightPR::operator=(), SPxSolver::perturbMax(), SPxSolver::perturbMin(), SPxDefaultRT::selectEnter(), SPxHarrisRT::selectEnter(), SPxBoundFlippingRT::selectEnter(), SPxDevexPR::selectEnterDenseCoDim(), SPxSteepPR::selectEnterDenseCoDim(), SPxDevexPR::selectEnterDenseDim(), SPxSteepPR::selectEnterDenseDim(), SPxDevexPR::selectEnterSparseCoDim(), SPxSteepPR::selectEnterSparseCoDim(), SPxDevexPR::selectEnterSparseDim(), SPxSteepPR::selectEnterSparseDim(), SPxDefaultRT::selectLeave(), SPxHarrisRT::selectLeave(), SPxWeightPR::selectLeave(), SPxSteepPR::selectLeave(), SPxDevexPR::selectLeavePart(), SPxSteepPR::selectLeavePart(), SPxDevexPR::selectLeaveSparse(), SPxSteepPR::selectLeaveSparse(), SPxDevexPR::selectLeaveX(), SPxWeightPR::setRep(), SPxSumST::setupWeights(), and SPxWeightPR::SPxWeightPR().
Conversion to C-style pointer.
This function serves for using a Vector in an C-style function. It returns a pointer to the first value of the array.
- Todo:
- check whether this non-const c-style acces should indeed be public
Definition at line 240 of file vector.h.
References Vector::val.
Referenced by SLUFactor::assign(), SLUFactor::change(), SPxSteepPR::entered4(), SSVector::get_ptr(), SPxSteepPR::left4(), SLUFactor::load(), SPxSumST::setupWeights(), SLUFactor::SLUFactor(), SLUFactor::solve2right4update(), SLUFactor::solve3right4update(), SLUFactor::solveLeft(), and SLUFactor::solveRight().
bool isConsistent |
( |
| ) |
const |
addition of scaled vector
multiply Vector with and add a SVector.
This is located in svector.h because it should be inlined and because of the cross dependencies of Vector and SVector.
- Todo:
- Can we move this function to a better place?
Definition at line 398 of file svector.h.
References Vector::dim(), SVector::dim(), SVector::Element::idx, SVector::m_elem, SVector::size(), Vector::val, and SVector::Element::val.
Referenced by SPxSolver::computeFrhs1(), SPxSolver::computeFrhsXtra(), SPxSolver::enter(), SPxSolver::leave(), SSVector::multAdd(), SPxBasis::multBaseWith(), SPxSumST::setupWeights(), and UpdateVector::update().
Real& operator[] |
( |
int |
n | ) |
|
Real operator[] |
( |
int |
n | ) |
const |
std::ostream& operator<< |
( |
std::ostream & |
s, |
|
|
const Vector & |
vec |
|
) |
| |
|
friend |
dimension of vector
Definition at line 90 of file vector.h.
Referenced by Vector::clear(), Vector::dim(), SSVector::dim(), DVector::DVector(), DVector::isConsistent(), Vector::multAdd(), Vector::operator*(), Vector::operator=(), Vector::operator[](), DVector::reDim(), DVector::reSize(), and Vector::Vector().
values of a vector
The memory block pointed to by val must at least have size dimen * sizeof(Real).
Definition at line 95 of file vector.h.
Referenced by SSVector::add(), SSVector::altValues(), Vector::assign(), SSVector::assign(), SSVector::assign2product(), SSVector::assign2product1(), SSVector::assign2productAndSetup(), SSVector::assign2productFull(), SSVector::assign2productShort(), Vector::clear(), SSVector::clear(), SSVector::clearIdx(), SSVector::clearNum(), DVector::DVector(), Vector::get_const_ptr(), Vector::get_ptr(), DVector::isConsistent(), Vector::isConsistent(), SSVector::isConsistent(), SSVector::length2(), Vector::maxAbs(), SSVector::maxAbs(), Vector::minAbs(), Vector::multAdd(), SSVector::multAdd(), Vector::operator*(), Vector::operator*=(), SSVector::operator*=(), Vector::operator+=(), SSVector::operator+=(), Vector::operator-=(), SSVector::operator-=(), Vector::operator=(), SSVector::operator=(), Vector::operator[](), SSVector::operator[](), DVector::reSize(), SSVector::setup(), SSVector::setup_and_assign(), SSVector::setValue(), SSVector::value(), and SSVector::values().
|