Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::arrayheap_detail::From_One< T > Struct Template Reference

The items of an array, numbered from 1. More...

#include <tpl_arrayHeap.H>

Public Member Functions

constexpr T & operator[] (const size_t i) const noexcept
 The item of a number.
 

Public Attributes

T * first
 The item 1.
 

Detailed Description

template<typename T>
struct Aleph::arrayheap_detail::From_One< T >

The items of an array, numbered from 1.

The sifts number the items of a heap from 1. An array whose first item is the item 1 has no entry 0, and a pointer to it may not be formed: this gives the items by their numbers instead.

Template Parameters
Tthe type of the items.

Definition at line 94 of file tpl_arrayHeap.H.

Member Function Documentation

◆ operator[]()

template<typename T >
constexpr T & Aleph::arrayheap_detail::From_One< T >::operator[] ( const size_t  i) const
inlineconstexprnoexcept

The item of a number.

Parameters
[in]ithe number of the item, from 1.
Returns
the item.

Definition at line 102 of file tpl_arrayHeap.H.

References Aleph::arrayheap_detail::From_One< T >::first.

Member Data Documentation

◆ first

template<typename T >
T* Aleph::arrayheap_detail::From_One< T >::first

The item 1.

Definition at line 96 of file tpl_arrayHeap.H.

Referenced by Aleph::arrayheap_detail::From_One< T >::operator[]().


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