ThreeB 1.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Public Attributes | Static Public Attributes
IndexLexicographicPosition< Cmp, First > Struct Template Reference
Storm classes specific to multispot processing

Class for sorting a list of indexes to an array of spots lexicographically according to the 2D positions of the spots. More...

List of all members.

## Public Member Functions
| IndexLexicographicPosition (const vector< Vector< 4 > > &s)
bool | operator() (int a, int b)
## Public Attributes
const vector< Vector< 4 > > & | spots
## Static Public Attributes
static const int | Second = First==2?3:2

## Detailed Description

### template<class Cmp, int First>
struct IndexLexicographicPosition< Cmp, First >

Class for sorting a list of indexes to an array of spots lexicographically according to the 2D positions of the spots.

Parameters:

  Cmp | comparator function to specify less or greater
  First | most significant position index

Definition at line 472 of file multispot5.cc.

## Constructor & Destructor Documentation

template<class Cmp , int First>

IndexLexicographicPosition< Cmp, First >::IndexLexicographicPosition | ( | const vector< Vector< 4 > > & | s | ) | `[inline]`

Parameters:

  s | Vector to sort indices of

Definition at line 476 of file multispot5.cc.

        :spots(s)
        {}

## Member Function Documentation

template<class Cmp , int First>

bool IndexLexicographicPosition< Cmp, First >::operator() | ( | int | a,
|  | int | b
| ) |  | `[inline]`

Compare two indexes into the array of spots.

Definition at line 484 of file multispot5.cc.

        {
            Cmp cmp;

            if(cmp(spots[a][First], spots[b][First]))
                return true;
            else if(spots[a][First] == spots[b][First])
                return cmp(spots[a][Second], spots[b][Second]);
            else
                return false;
        }

## Member Data Documentation

template<class Cmp , int First>

const vector<Vector<4> >& IndexLexicographicPosition< Cmp, First >::spots

Keep around the array of spots for later comprison.

Definition at line 473 of file multispot5.cc.

template<class Cmp , int First>

const int IndexLexicographicPosition< Cmp, First >::Second = First==2?3:2`[static]`

Second most siginifcant position index for sorting.

Definition at line 481 of file multispot5.cc.

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

- multispot5.cc