Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
al-domain.H File Reference

Integer domain classes for sparse data structures. More...

#include <tpl_hash.H>
#include <ah-errors.H>
Include dependency graph for al-domain.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Aleph::AlDomain< T >
 Generic domain class based on hash set. More...
 
struct  Aleph::IntRange
 Integer range domain [start, end] with optional step. More...
 

Namespaces

namespace  Aleph
 Main namespace for Aleph-w library functions.
 

Functions

template<typename T >
std::ostream & Aleph::operator<< (std::ostream &s, const AlDomain< T > &dom)
 Output stream operator for AlDomain.
 

Detailed Description

Integer domain classes for sparse data structures.

This file provides domain classes representing sets of values, primarily used as index domains for sparse matrices and vectors.

Features

  • Hash-based set for O(1) membership testing
  • Sorted key iteration
  • Range-based domain construction

Usage Example

// Create domain [0, 9]
IntRange domain(0, 9);
// Create domain {0, 1, ..., n-1}
IntRange indices(100);
// Create domain with step: {0, 2, 4, 6, 8, 10}
IntRange even(0, 10, 2);
See also
tpl_dynMat.H Sparse matrix using domains
Author
Leandro Rabindranath León

Definition in file al-domain.H.