Class representing a generic buffer.
More...
#include <backend.hpp>
|
typedef T | base |
| Type def to retrieve the backend T type.
|
|
|
| buffer () |
| Construct an empty buffer backend.
|
|
| buffer (const size_t s) |
| Construct a buffer backend with a size.
|
|
| buffer (const size_t s, const T d) |
| Construct a buffer backend with a size.
|
|
| buffer (const std::vector< T > &d) |
| Construct a buffer backend from a vector.
|
|
| buffer (const buffer &d) |
| Construct a buffer backend from a buffer backend.
|
|
T & | operator[] (const size_t index) |
| Index operator.
|
|
const T & | operator[] (const size_t index) const |
| Const index operator.
|
|
const T | at (const size_t index) const |
| Get value at.
|
|
void | set (const T d) |
| Assign a constant value.
|
|
void | set (const std::vector< T > &d) |
| Assign a vector value.
|
|
size_t | size () const |
| Get size of the buffer.
|
|
bool | is_same () const |
| Is every element the same.
|
|
bool | is_zero () const |
| Is every element zero.
|
|
bool | has_zero () const |
| Is any element zero.
|
|
bool | is_negative () const |
| Is every element negative.
|
|
bool | is_even () const |
| Is every element even.
|
|
bool | is_none () const |
| Is every element negative one.
|
|
void | sqrt () |
| Take sqrt.
|
|
void | exp () |
| Take exp.
|
|
void | log () |
| Take log.
|
|
void | sin () |
| Take sin.
|
|
void | cos () |
| Take cos.
|
|
void | erfi () |
| Take erfi.
|
|
T * | data () |
| Get a pointer to the basic memory buffer.
|
|
bool | is_normal () const |
| Check for normal values.
|
|
void | add_row (const buffer< T > &x) |
| Add row operation.
|
|
void | add_col (const buffer< T > &x) |
| Add col operation.
|
|
void | subtract_row (const buffer< T > &x) |
| Subtract row operation.
|
|
void | subtract_col (const buffer< T > &x) |
| Subtract col operation.
|
|
void | multiply_row (const buffer< T > &x) |
| Multiply row operation.
|
|
void | multiply_col (const buffer< T > &x) |
| Multiply col operation.
|
|
void | divide_row (const buffer< T > &x) |
| Divide row operation.
|
|
void | divide_col (const buffer< T > &x) |
| Divide col operation.
|
|
void | atan_row (const buffer< T > &x) |
| Atan row operation.
|
|
void | atan_col (const buffer< T > &x) |
| Atan col operation.
|
|
void | pow_row (const buffer< T > &x) |
| Pow row operation.
|
|
void | pow_col (const buffer< T > &x) |
| Pow col operation.
|
|
Class representing a generic buffer.
- Template Parameters
-
T | Base type of the calculation. |
◆ buffer() [1/4]
Construct a buffer backend with a size.
- Parameters
-
[in] | s | Size of he data buffer. |
◆ buffer() [2/4]
Construct a buffer backend with a size.
- Parameters
-
[in] | s | Size of he data buffer. |
[in] | d | Scalar data to initalize. |
◆ buffer() [3/4]
Construct a buffer backend from a vector.
- Parameters
-
◆ buffer() [4/4]
Construct a buffer backend from a buffer backend.
- Parameters
-
◆ add_col()
Add col operation.
Adds m_ij + v_j or v_j + m_ij. This will resize the buffer if it needs to be.
- Parameters
-
◆ add_row()
Add row operation.
Adds m_ij + v_i or v_i + m_ij. This will resize the buffer if it needs to be.
- Parameters
-
◆ atan_col()
Atan col operation.
Computes atan(m_ij, v_j) or atan(v_j, m_ij). This will resize the buffer if it needs to be.
- Parameters
-
◆ atan_row()
Atan row operation.
Computes atan(m_ij, v_i) or atan(v_i, m_ij). This will resize the buffer if it needs to be.
- Parameters
-
◆ data()
Get a pointer to the basic memory buffer.
- Returns
- The pointer to the buffer memory.
◆ divide_col()
Divide col operation.
Divides m_ij / v_j or v_j / m_ij. This will resize the buffer if it needs to be.
- Parameters
-
◆ divide_row()
Divide row operation.
Divides m_ij / v_i or v_i / m_ij. This will resize the buffer if it needs to be.
- Parameters
-
◆ has_zero()
Is any element zero.
- Returns
- Returns true if any element is zero.
◆ is_even()
Is every element even.
- Returns
- Returns true if every element is negative.
◆ is_negative()
Is every element negative.
- Returns
- Returns true if every element is negative.
◆ is_none()
Is every element negative one.
- Returns
- Returns true if every element is negative one.
◆ is_normal()
Check for normal values.
- Returns
- False if any NaN or Inf is found.
◆ is_same()
Is every element the same.
- Returns
- Returns true if every element is the same.
◆ is_zero()
Is every element zero.
- Returns
- Returns true if every element is zero.
◆ multiply_col()
Multiply col operation.
Multiplies m_ij * v_j or v_j * m_ij. This will resize the buffer if it needs to be.
- Parameters
-
◆ multiply_row()
Multiply row operation.
Multiplies m_ij * v_i or v_i * m_ij. This will resize the buffer if it needs to be.
- Parameters
-
◆ pow_col()
Pow col operation.
Computes pow(m_ij, v_j) or pow(v_j, m_ij). This will resize the buffer if it needs to be.
- Parameters
-
◆ pow_row()
Pow row operation.
Computes pow(m_ij, v_i) or pow(v_i, m_ij). This will resize the buffer if it needs to be.
- Parameters
-
◆ set() [1/2]
Assign a vector value.
- Parameters
-
◆ set() [2/2]
Assign a constant value.
- Parameters
-
◆ subtract_col()
Subtract col operation.
Sunbtracts m_ij - v_j or v_j - m_ij. This will resize the buffer if it needs to be.
- Parameters
-
◆ subtract_row()
Subtract row operation.
Sunbtracts m_ij - v_i or v_i - m_ij. This will resize the buffer if it needs to be.
- Parameters
-
The documentation for this class was generated from the following file: