Lazily evaluated list. More...


Go to the source code of this file.
Classes | |
| class | LazyList< T > |
| Ordered list whose terms are evaluated lazily. More... | |
| class | Echo< T > |
| Converts a vector to a lazy list. More... | |
| class | ContiguousChunk< T > |
| Creates a contiguous chunk of a lazy list. More... | |
Functions | |
| template<class T > | |
| vector< T > | serial_generate (const LazyList< T > &ll) |
| Creates a vector from an LazyList. More... | |
| template<class T > | |
| vector< T > | termwise_product (const vector< T > &v, const T &s) |
| Multiplies all terms of std::vector with a scalar. More... | |
| template<class T > | |
| vector< T > | trim_top (const vector< T > &v, const size_t max_index) |
| Trims a list and retains only a specific number of the first terms. More... | |
| template<class T > | |
| int | ElementNumber (vector< vector< T > > const &vec) |
| Calculates the total number of elements in the 2d vector. More... | |
| template<class T > | |
| void | ListExchange (vector< T > &vec, vector< int > const &indeces, vector< T > const &data) |
| Exchanges memebers in vec with indeces given by indeces and data given by data. More... | |
| template<class T > | |
| T | lazy_sum (const LazyList< T > &i2m) |
| Sums terms of a lazy list. More... | |
| template<class T > | |
| T | lazy_max (const LazyList< T > &i2m) |
| Finds the maximum of a lazy list. More... | |
| template<class T > | |
| T | lazy_min (const LazyList< T > &i2m) |
| Finds the minimum of a lazy list. More... | |
Lazily evaluated list.
Definition in file lazy_list.hpp.
| int ElementNumber | ( | vector< vector< T > > const & | vec | ) |
Calculates the total number of elements in the 2d vector.
| vec | The vector to count |
Definition at line 130 of file lazy_list.hpp.

| T lazy_max | ( | const LazyList< T > & | i2m | ) |
Finds the maximum of a lazy list.
| i2m | Lazy list |
Definition at line 174 of file lazy_list.hpp.

| T lazy_min | ( | const LazyList< T > & | i2m | ) |
Finds the minimum of a lazy list.
| i2m | Lazy list |
Definition at line 186 of file lazy_list.hpp.


| T lazy_sum | ( | const LazyList< T > & | i2m | ) |
Sums terms of a lazy list.
| i2m | lazy list |
Definition at line 162 of file lazy_list.hpp.


| void ListExchange | ( | vector< T > & | vec, |
| vector< int > const & | indeces, | ||
| vector< T > const & | data | ||
| ) |
Exchanges memebers in vec with indeces given by indeces and data given by data.
| vec | The vector to change |
| indeces | The indeces in vec to change |
| data | The data to put inside vec |
Definition at line 144 of file lazy_list.hpp.

| vector<T> serial_generate | ( | const LazyList< T > & | ll | ) |
Creates a vector from an LazyList.
| ll | Lazily evaluated list |
Definition at line 49 of file lazy_list.hpp.


| vector<T> termwise_product | ( | const vector< T > & | v, |
| const T & | s | ||
| ) |
Multiplies all terms of std::vector with a scalar.
| v | std::vector |
| s | Scalar |
Definition at line 62 of file lazy_list.hpp.

| vector<T> trim_top | ( | const vector< T > & | v, |
| const size_t | max_index | ||
| ) |
Trims a list and retains only a specific number of the first terms.
| v | std::vector |
| max_index | Number of terms to retain |
Definition at line 96 of file lazy_list.hpp.

1.8.13