A column of the output problem formulation, along with its values. More...
#include <field.hh>

Public Member Functions | |
| field () | |
| Default constructor. | |
| field (std::string *name, std::vector< rational > *values) | |
| Constructor for use by the parser. | |
| void | swap (field &other) |
| Swap two fields. | |
Public Attributes | |
| std::string | name |
| The name of the column. | |
| std::vector< rational > | values |
| The matrix elements of the column. | |
A column of the output problem formulation, along with its values.
In terms of the matrix of a linear program, a field object describes a single column, giving its name as well as the matrix elements in that column.
Columns may come directly from the input field description, but additional columns are created during problem transformation, and most will be expressed through an object of this class as well.
The object does not store any information about the bounds of the variable associated with this column.
Definition at line 44 of file field.hh.
| field::field | ( | ) |
| field::field | ( | std::string * | n, | |
| std::vector< rational > * | v | |||
| ) |
Constructor for use by the parser.
As the parser represents most objects through pointers, this version of the constructor accepts pointers, and takes care of freeing the memory of the objects pointed to.
| n | the name of the field. | |
| v | the sequence of matrix elements. |
Definition at line 50 of file field.cc.
References values.
| void field::swap | ( | field & | other | ) |
Swap two fields.
This method implements the optimized swapping operation, which is used by the std::swap(field&, field&) function in generic code.
| other | the other field objects with which this one should be swapped. |
Definition at line 64 of file field.cc.
Referenced by std::swap().
| std::string field::name |
| std::vector<rational> field::values |
The matrix elements of the column.
The values correspond to quantum numbers according to the order stored in driver::names.
Definition at line 61 of file field.hh.
Referenced by field(), field_cmp::operator()(), vdiff::operator[](), and swap().
1.6.0