Lattice Builder Manual
Software Package for Constructing Rank-1 Lattices
LatCommon::Coordinates Class Reference

Set of coordinates. More...

#include <Coordinates.h>

Inherits std::set< K >.

Public Member Functions

 Coordinates ()
 Constructs an empty coordinate set.
 
 Coordinates (const Coordinates &other)
 Copy-constructor.
 
template<typename InputIterator >
 Coordinates (InputIterator first, InputIterator last)
 Constructs a coordinate set populated with the values from first (inclusively) to last (exclusively).
 

Static Public Member Functions

static value_type asOutput (value_type i)
 Maps the internal representation of a coordinate value to its external representation.
 
static value_type asInput (value_type i)
 Maps the external representation of a coordinate value to its internal representation.
 

Static Public Attributes

static bool humanize
 “Humanize” the formatting of coordinate values. More...
 

Related Functions

(Note that these are not member functions.)

std::ostream & operator<< (std::ostream &os, const Coordinates &coords)
 
std::istream & operator>> (std::istream &is, Coordinates &coords)
 

Detailed Description

Set of coordinates.

Remarks
Coordinates indices start at 0. To make the input/output representation of coordinates start at 1 instead of 0, see humanize. For code written with coordinate indices starting at 1, set humanize to false.

Friends And Related Function Documentation

std::ostream & operator<< ( std::ostream &  os,
const Coordinates coords 
)
related

Formats the coordinate set coords and outputs it to os.

std::istream & operator>> ( std::istream &  is,
Coordinates coords 
)
related

Reads a formatted coordinate set from is.

The input must consist of positive integers separated by whitespace and/or by commas, and optionally enclosed in braces. The ordering is not important. Repeated values are ignored. For example, the following strings are valid input that would produce equivalent Coordinates objects:

  • 1 2 5
  • 1, 2, 5
  • {1 2 5}
  • {1,2,5}
  • {1, 2, 5}
  • 2 5 1
  • 2 1 5 1

Member Data Documentation

bool LatCommon::Coordinates::humanize
static

“Humanize” the formatting of coordinate values.

If set to true, the external representation of coordinate values if shifted by one with respect to its internal representation. More precisely, an internal coordinate value \(j\) is mapped to the external representation \(j+1\) during output, and an external coordinate value \(j+1\) is mapped to internal representation \(j\) during input.

Defaults to true;

See also
asOutput() asInput()

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