TBTK
Index.h File Reference

Flexible physical index. More...

#include "TBTK/Serializable.h"
#include "TBTK/Streams.h"
#include <vector>

Go to the source code of this file.

Classes

class  TBTK::Index
 Flexible physical index. More...
 

Enumerations

enum  {
  _ = -1, ___ = -1, IDX_ALL = -1, IDX_SUM_ALL = -2,
  IDX_X = -3, IDX_Y = -4, IDX_Z = -5, IDX_SPIN = -6,
  IDX_SEPARATOR = -7
}
 Enum for special subindex values. More...
 

Detailed Description

Flexible physical index.

Author
Kristofer Björnson

Enumeration Type Documentation

anonymous enum

Enum for special subindex values.

While non-negative subindices in an Index corresponds to normal subindices, negative subindices are reserved for special purposes.

IDX_ALL = _ = ___:
Wildcard Used to indicate that all indices are to be considered or that the particular subindex value is of no interest. To improve self-documentation for library code, only IDX_ALL should be used in actuall library code. '_' and '___' are syntactic suggar meant for use in application code.

IDX_X, IDX_Y, IDX_Z:
Loop indices used to indicate that a particular index should be looped over.

IDX_SPIN:
Used to indicate that a certain subindex should be interpreted as a spin-subindex.

IDX_SEPARATOR:
Used as Index-separator in compound indices such as {{1, 2}, {3, 4}}, which is stored as {1, 2, IDX_SEPARATOR, 3, 4}.