field Class Reference

A column of the output problem formulation, along with its values. More...

#include <field.hh>

Collaboration diagram for field:
Collaboration graph
[legend]

List of all members.

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< rationalvalues
 The matrix elements of the column.

Detailed Description

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.


Constructor & Destructor Documentation

field::field (  ) 

Default constructor.

Members will be initialized to their default values.

Definition at line 38 of file field.cc.

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.

Parameters:
n the name of the field.
v the sequence of matrix elements.

Definition at line 50 of file field.cc.

References values.


Member Function Documentation

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.

Parameters:
other the other field objects with which this one should be swapped.

Definition at line 64 of file field.cc.

References name, and values.

Referenced by std::swap().


Member Data Documentation

std::string field::name

The name of the column.

If the object belongs to a field from the input description, the field name given there will be stored. For internally generated columns, unique names starting with an underscore will be chosen.

Definition at line 54 of file field.hh.

Referenced by swap().

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().


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

Generated on Fri Aug 21 08:15:08 2009 for mqn2mps by  doxygen 1.6.0