PineForge unreleased
Deterministic PineScript v6 backtest runtime — C ABI reference
Loading...
Searching...
No Matches
pineforge::GenericMatrix< bool > Class Reference

#include <generic_matrix.hpp>

Data Structures

class  Snapshot
 

Public Member Functions

 GenericMatrix () noexcept=default
 
 GenericMatrix (const GenericMatrix &) noexcept=default
 
GenericMatrix & operator= (const GenericMatrix &) noexcept=default
 
 GenericMatrix (GenericMatrix &&other) noexcept
 
GenericMatrix & operator= (GenericMatrix &&other) noexcept
 
bool get (int row, int col) const
 
void set (int row, int col, bool val)
 
void fill (bool val)
 
int rows () const
 
int columns () const
 
std::vector< bool > row (int idx) const
 
std::vector< bool > col (int idx) const
 
void add_row (int idx, const std::vector< bool > &values)
 
void add_col (int idx, const std::vector< bool > &values)
 
void remove_row (int idx)
 
void remove_col (int idx)
 
void swap_rows (int i, int j)
 
void swap_columns (int i, int j)
 
GenericMatrix copy () const
 
GenericMatrix submatrix (int from_row, int to_row, int from_col, int to_col) const
 
void reshape (int new_rows, int new_cols)
 
void reverse ()
 
GenericMatrix transpose () const
 
GenericMatrix concat (const GenericMatrix &other, bool horizontal) const
 
template<typename Dummy = void>
void sort (int, bool=true)
 
int elements_count () const
 
bool is_na () const noexcept
 
Snapshot snapshot () const
 
void restore (const Snapshot &snapshot)
 
 GenericMatrix () noexcept=default
 
 GenericMatrix (const GenericMatrix &) noexcept=default
 
 GenericMatrix (GenericMatrix &&other) noexcept
 
GenericMatrix & operator= (const GenericMatrix &) noexcept=default
 
GenericMatrix & operator= (GenericMatrix &&other) noexcept
 
 ~GenericMatrix ()=default
 
bool get (int row, int col) const
 
void set (int row, int col, bool val)
 
void fill (bool val)
 
int rows () const
 
int columns () const
 
std::vector< bool > row (int idx) const
 
std::vector< bool > col (int idx) const
 
const std::vector< bool > & row_ref (int idx) const
 
void add_row (int idx, const std::vector< bool > &values)
 
void add_col (int idx, const std::vector< bool > &values)
 
void remove_row (int idx)
 
void remove_col (int idx)
 
void swap_rows (int i, int j)
 
void swap_columns (int i, int j)
 
GenericMatrix copy () const
 
GenericMatrix submatrix (int from_row, int to_row, int from_col, int to_col) const
 
GenericMatrix transpose () const
 
GenericMatrix concat (const GenericMatrix &other, bool horizontal) const
 
void reshape (int new_rows, int new_cols)
 
void reverse ()
 
void sort (int column, bool ascending=true)
 
int elements_count () const
 
bool is_na () const noexcept
 
Snapshot snapshot () const
 
void restore (const Snapshot &snapshot)
 

Static Public Member Functions

static GenericMatrix new_ (int rows, int cols, bool init)
 
static GenericMatrix new_ (int rows, int cols)
 
static GenericMatrix new_ (int rows, int cols, bool init)
 
static GenericMatrix new_ (int rows, int cols)
 

Detailed Description

Definition at line 501 of file generic_matrix.hpp.

Constructor & Destructor Documentation

◆ GenericMatrix() [1/6]

pineforge::GenericMatrix< bool >::GenericMatrix ( )
defaultnoexcept

◆ GenericMatrix() [2/6]

pineforge::GenericMatrix< bool >::GenericMatrix ( const GenericMatrix< bool > & )
defaultnoexcept

◆ GenericMatrix() [3/6]

pineforge::GenericMatrix< bool >::GenericMatrix ( GenericMatrix< bool > && other)
inlinenoexcept

Definition at line 539 of file generic_matrix.hpp.

◆ GenericMatrix() [4/6]

pineforge::GenericMatrix< bool >::GenericMatrix ( )
defaultnoexcept

◆ GenericMatrix() [5/6]

pineforge::GenericMatrix< bool >::GenericMatrix ( const GenericMatrix< bool > & )
defaultnoexcept

◆ GenericMatrix() [6/6]

pineforge::GenericMatrix< bool >::GenericMatrix ( GenericMatrix< bool > && other)
inlinenoexcept

Definition at line 206 of file generic_matrix.hpp.

◆ ~GenericMatrix()

pineforge::GenericMatrix< bool >::~GenericMatrix ( )
default

Member Function Documentation

◆ operator=() [1/4]

GenericMatrix & pineforge::GenericMatrix< bool >::operator= ( const GenericMatrix< bool > & )
defaultnoexcept

◆ operator=() [2/4]

GenericMatrix & pineforge::GenericMatrix< bool >::operator= ( GenericMatrix< bool > && other)
inlinenoexcept

Definition at line 541 of file generic_matrix.hpp.

◆ new_() [1/4]

static GenericMatrix pineforge::GenericMatrix< bool >::new_ ( int rows,
int cols,
bool init )
inlinestaticnodiscard

◆ new_() [2/4]

static GenericMatrix pineforge::GenericMatrix< bool >::new_ ( int rows,
int cols )
inlinestaticnodiscard

Definition at line 572 of file generic_matrix.hpp.

References pineforge::GenericMatrix< T >::new_(), and rows().

◆ get() [1/2]

◆ set() [1/2]

◆ fill() [1/2]

void pineforge::GenericMatrix< bool >::fill ( bool val)
inline

Definition at line 602 of file generic_matrix.hpp.

◆ rows() [1/2]

int pineforge::GenericMatrix< bool >::rows ( ) const
inline

Definition at line 607 of file generic_matrix.hpp.

Referenced by new_(), and new_().

◆ columns() [1/2]

int pineforge::GenericMatrix< bool >::columns ( ) const
inline

Definition at line 610 of file generic_matrix.hpp.

Referenced by add_row().

◆ row() [1/2]

std::vector< bool > pineforge::GenericMatrix< bool >::row ( int idx) const
inline

◆ col() [1/2]

std::vector< bool > pineforge::GenericMatrix< bool >::col ( int idx) const
inline

◆ add_row() [1/2]

void pineforge::GenericMatrix< bool >::add_row ( int idx,
const std::vector< bool > & values )
inline

◆ add_col() [1/2]

void pineforge::GenericMatrix< bool >::add_col ( int idx,
const std::vector< bool > & values )
inline

◆ remove_row() [1/2]

◆ remove_col() [1/2]

◆ swap_rows() [1/2]

◆ swap_columns() [1/2]

◆ copy() [1/2]

GenericMatrix pineforge::GenericMatrix< bool >::copy ( ) const
inlinenodiscard

◆ submatrix() [1/2]

◆ reshape() [1/2]

void pineforge::GenericMatrix< bool >::reshape ( int new_rows,
int new_cols )
inline

Definition at line 748 of file generic_matrix.hpp.

References pineforge::detail::reshape_impl().

◆ reverse() [1/2]

void pineforge::GenericMatrix< bool >::reverse ( )
inline

Definition at line 752 of file generic_matrix.hpp.

◆ transpose() [1/2]

◆ concat() [1/2]

◆ sort() [1/2]

template<typename Dummy = void>
void pineforge::GenericMatrix< bool >::sort ( int ,
bool = true )
inline

Definition at line 783 of file generic_matrix.hpp.

◆ elements_count() [1/2]

int pineforge::GenericMatrix< bool >::elements_count ( ) const
inline

Definition at line 789 of file generic_matrix.hpp.

References pineforge::detail::elements_count_impl().

◆ is_na() [1/2]

bool pineforge::GenericMatrix< bool >::is_na ( ) const
inlinenodiscardnoexcept

Definition at line 793 of file generic_matrix.hpp.

◆ snapshot() [1/2]

Snapshot pineforge::GenericMatrix< bool >::snapshot ( ) const
inlinenodiscard

Definition at line 795 of file generic_matrix.hpp.

Referenced by restore().

◆ restore() [1/2]

void pineforge::GenericMatrix< bool >::restore ( const Snapshot & snapshot)
inline

Definition at line 800 of file generic_matrix.hpp.

References pineforge::detail::matrix_snapshot_error(), and snapshot().

◆ operator=() [3/4]

GenericMatrix & pineforge::GenericMatrix< bool >::operator= ( const GenericMatrix< bool > & )
defaultnoexcept

◆ operator=() [4/4]

GenericMatrix & pineforge::GenericMatrix< bool >::operator= ( GenericMatrix< bool > && other)
inlinenoexcept

Definition at line 208 of file generic_matrix.hpp.

◆ new_() [3/4]

static GenericMatrix pineforge::GenericMatrix< bool >::new_ ( int rows,
int cols,
bool init )
inlinestaticnodiscard

Definition at line 234 of file generic_matrix.hpp.

◆ new_() [4/4]

static GenericMatrix pineforge::GenericMatrix< bool >::new_ ( int rows,
int cols )
inlinestaticnodiscard

Definition at line 244 of file generic_matrix.hpp.

◆ get() [2/2]

bool pineforge::GenericMatrix< bool >::get ( int row,
int col ) const
inline

Definition at line 256 of file generic_matrix.hpp.

◆ set() [2/2]

void pineforge::GenericMatrix< bool >::set ( int row,
int col,
bool val )
inline

Definition at line 269 of file generic_matrix.hpp.

◆ fill() [2/2]

void pineforge::GenericMatrix< bool >::fill ( bool val)
inline

Definition at line 282 of file generic_matrix.hpp.

◆ rows() [2/2]

int pineforge::GenericMatrix< bool >::rows ( ) const
inline

Definition at line 286 of file generic_matrix.hpp.

◆ columns() [2/2]

int pineforge::GenericMatrix< bool >::columns ( ) const
inline

Definition at line 289 of file generic_matrix.hpp.

◆ row() [2/2]

std::vector< bool > pineforge::GenericMatrix< bool >::row ( int idx) const
inline

Definition at line 294 of file generic_matrix.hpp.

◆ col() [2/2]

std::vector< bool > pineforge::GenericMatrix< bool >::col ( int idx) const
inline

Definition at line 303 of file generic_matrix.hpp.

◆ row_ref()

const std::vector< bool > & pineforge::GenericMatrix< bool >::row_ref ( int idx) const
inline

Definition at line 317 of file generic_matrix.hpp.

◆ add_row() [2/2]

void pineforge::GenericMatrix< bool >::add_row ( int idx,
const std::vector< bool > & values )
inline

Definition at line 326 of file generic_matrix.hpp.

◆ add_col() [2/2]

void pineforge::GenericMatrix< bool >::add_col ( int idx,
const std::vector< bool > & values )
inline

Definition at line 340 of file generic_matrix.hpp.

◆ remove_row() [2/2]

void pineforge::GenericMatrix< bool >::remove_row ( int idx)
inline

Definition at line 365 of file generic_matrix.hpp.

◆ remove_col() [2/2]

void pineforge::GenericMatrix< bool >::remove_col ( int idx)
inline

Definition at line 374 of file generic_matrix.hpp.

◆ swap_rows() [2/2]

void pineforge::GenericMatrix< bool >::swap_rows ( int i,
int j )
inline

Definition at line 383 of file generic_matrix.hpp.

◆ swap_columns() [2/2]

void pineforge::GenericMatrix< bool >::swap_columns ( int i,
int j )
inline

Definition at line 392 of file generic_matrix.hpp.

◆ copy() [2/2]

GenericMatrix pineforge::GenericMatrix< bool >::copy ( ) const
inlinenodiscard

Definition at line 401 of file generic_matrix.hpp.

◆ submatrix() [2/2]

GenericMatrix pineforge::GenericMatrix< bool >::submatrix ( int from_row,
int to_row,
int from_col,
int to_col ) const
inlinenodiscard

Definition at line 405 of file generic_matrix.hpp.

◆ transpose() [2/2]

GenericMatrix pineforge::GenericMatrix< bool >::transpose ( ) const
inlinenodiscard

Definition at line 429 of file generic_matrix.hpp.

◆ concat() [2/2]

GenericMatrix pineforge::GenericMatrix< bool >::concat ( const GenericMatrix< bool > & other,
bool horizontal ) const
inlinenodiscard

Definition at line 436 of file generic_matrix.hpp.

◆ reshape() [2/2]

void pineforge::GenericMatrix< bool >::reshape ( int new_rows,
int new_cols )
inline

Definition at line 455 of file generic_matrix.hpp.

◆ reverse() [2/2]

void pineforge::GenericMatrix< bool >::reverse ( )
inline

Definition at line 461 of file generic_matrix.hpp.

◆ sort() [2/2]

void pineforge::GenericMatrix< bool >::sort ( int column,
bool ascending = true )
inline

Definition at line 466 of file generic_matrix.hpp.

◆ elements_count() [2/2]

int pineforge::GenericMatrix< bool >::elements_count ( ) const
inline

Definition at line 474 of file generic_matrix.hpp.

◆ is_na() [2/2]

bool pineforge::GenericMatrix< bool >::is_na ( ) const
inlinenodiscardnoexcept

Definition at line 478 of file generic_matrix.hpp.

◆ snapshot() [2/2]

Snapshot pineforge::GenericMatrix< bool >::snapshot ( ) const
inlinenodiscard

Definition at line 480 of file generic_matrix.hpp.

◆ restore() [2/2]

void pineforge::GenericMatrix< bool >::restore ( const Snapshot & snapshot)
inline

Definition at line 485 of file generic_matrix.hpp.


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