Class IndexFactory

Class Documentation

class IndexFactory

Generates temporary indices.

Public Functions

IndexFactory() = default
template<typename IndexValidator>
inline explicit IndexFactory(IndexValidator validator, size_t min_index = Index::min_tmp_index())
Template Parameters:

IndexValidator – IndexValidator(const Index&) -> bool is valid and returns true generated index is valid

Parameters:
  • validator – a validator for the generated indices

  • min_index – start indexing indices for each space with this value; must be greater than 0; the default is to use Index::min_tmp_index()

inline Index make(const IndexSpace &space)

creates a temporary index in space space . The label of the resulting index = IndexSpace::base_key(space) + ‘_’ + temporary counter. Each call increments the current tmp counter (see next_tmp_index() ) .

Parameters:

space – an IndexSpace object

Returns:

a unique temporary index in space space

inline Index make(const Index &idx)

creates a temporary index that inherits the space and protoindices of idx . The label of the resulting index = IndexSpace::base_key(space) + ‘_’ + temporary counter. Each call increments the current tmp counter (see next_tmp_index() ) .

Parameters:

idx – an Index object

Returns:

a unique temporary index in space space with same protoindices as idx