Interior-point-optimisation  1.0-1
Interior-pointoptimisationlibrary
ipo::Model::DirectSubvector Class Reference

This class gives direct access to a subvector of a vector. More...

Inheritance diagram for ipo::Model::DirectSubvector:
Inheritance graph
Collaboration diagram for ipo::Model::DirectSubvector:
Collaboration graph

Public Member Functions

 DirectSubvector (size_t const offset, size_t const length)
 The constructor needs an offset and a length. More...
 
virtual gsl::vector const get (gsl::vector const &vector) const
 This returns a subvector using offset and length without checking bounds directly. More...
 
virtual void set (gsl::vector &vector, gsl::vector const &subvector, double const scale=1.0) const
 Set vector from a subvector without checking bounds. More...
 
virtual void add (gsl::vector &vector, gsl::vector const &subvector, double const scale=1.0) const
 Add to vector from a subvector without checking bounds. More...
 
virtual void set (gsl::matrix &matrix, gsl::matrix const &submatrix, double const scale=1.0) const
 Set matrix from a submatrix without checking bounds. More...
 
virtual void add (gsl::matrix &matrix, gsl::matrix const &submatrix, double const scale=1) const
 Add to matrix from a submatrix without checking bounds. More...
 
virtual void set (gsl::matrix &matrix, gsl::vector const &vector, double const scale=1) const
 Set matrix from a vector without checking bounds. More...
 
virtual void add (gsl::matrix &matrix, gsl::vector const &vector, double const scale=1.0) const
 Add to matrix from a vector without checking bounds. More...
 
- Public Member Functions inherited from ipo::Model::Subvector
 Subvector ()
 Default constructor. More...
 

Private Attributes

size_t const offset
 The offset. More...
 
size_t const length
 The length. More...
 

Detailed Description

This class gives direct access to a subvector of a vector.

Definition at line 475 of file Model.hpp.

Constructor & Destructor Documentation

Model::DirectSubvector::DirectSubvector ( size_t const  offset,
size_t const  length 
)

The constructor needs an offset and a length.

Parameters
offsetThe offset from the start of vector
lengthThe length of the subvector

Definition at line 31 of file Model.cc.

Member Function Documentation

virtual void ipo::Model::DirectSubvector::add ( gsl::vector &  vector,
gsl::vector const &  subvector,
double const  scale = 1.0 
) const
inlinevirtual

Add to vector from a subvector without checking bounds.

Parameters
vectorThe vector
subvectorThe subvector
scaleA scaling factor: computes vector += scale * [expanded] subvector

Implements ipo::Model::Subvector.

Definition at line 506 of file Model.hpp.

References length.

virtual void ipo::Model::DirectSubvector::add ( gsl::matrix &  matrix,
gsl::matrix const &  submatrix,
double const  scale = 1 
) const
inlinevirtual

Add to matrix from a submatrix without checking bounds.

Computes matrix += scale * [expanded] submatrix.

Parameters
matrixThe matrix
submatrixThe submatrix
scaleA scaling factor

Implements ipo::Model::Subvector.

Definition at line 531 of file Model.hpp.

References length.

virtual void ipo::Model::DirectSubvector::add ( gsl::matrix &  matrix,
gsl::vector const &  vector,
double const  scale = 1.0 
) const
inlinevirtual

Add to matrix from a vector without checking bounds.

Computes matrix += scale * [expanded] submatrix * [expanded] vector transpose

Parameters
matrixThe matrix
vectorThe vector
scaleA scaling factor

Implements ipo::Model::Subvector.

Definition at line 564 of file Model.hpp.

References length.

virtual gsl::vector const ipo::Model::DirectSubvector::get ( gsl::vector const &  vector) const
inlinevirtual

This returns a subvector using offset and length without checking bounds directly.

Parameters
vectorThe vector
Returns
a subvector of vector

Implements ipo::Model::Subvector.

Definition at line 489 of file Model.hpp.

virtual void ipo::Model::DirectSubvector::set ( gsl::vector &  vector,
gsl::vector const &  subvector,
double const  scale = 1.0 
) const
inlinevirtual

Set vector from a subvector without checking bounds.

Parameters
vectorThe vector
subvectorThe subvector
scaleA scaling factor: computes vector += scale * [expanded] subvector

Implements ipo::Model::Subvector.

Definition at line 497 of file Model.hpp.

References length.

virtual void ipo::Model::DirectSubvector::set ( gsl::matrix &  matrix,
gsl::matrix const &  submatrix,
double const  scale = 1.0 
) const
inlinevirtual

Set matrix from a submatrix without checking bounds.

Parameters
matrixThe matrix
submatrixThe submatrix
scaleA scaling factor: computes matrix += scale * [expanded] submatrix

Implements ipo::Model::Subvector.

Definition at line 515 of file Model.hpp.

References length.

virtual void ipo::Model::DirectSubvector::set ( gsl::matrix &  matrix,
gsl::vector const &  vector,
double const  scale = 1 
) const
inlinevirtual

Set matrix from a vector without checking bounds.

Parameters
matrixThe matrix
vectorThe vector
scaleA scaling factor: computes matrix += scale * [expanded] vector * [expanded] vector transpose

Implements ipo::Model::Subvector.

Definition at line 548 of file Model.hpp.

References length.

Member Data Documentation

size_t const ipo::Model::DirectSubvector::length
private

The length.

Definition at line 582 of file Model.hpp.

Referenced by add(), and set().

size_t const ipo::Model::DirectSubvector::offset
private

The offset.

Definition at line 578 of file Model.hpp.


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