PineForge v0.13.1-379-g9b50973
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
 
GenericMatrixoperator= (const GenericMatrix &) noexcept=default
 
 GenericMatrix (GenericMatrix &&other) noexcept
 
GenericMatrixoperator= (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
 
GenericMatrixoperator= (const GenericMatrix &) noexcept=default
 
GenericMatrixoperator= (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 419 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 457 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 172 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 459 of file generic_matrix.hpp.

◆ new_() [1/4]

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

Definition at line 480 of file generic_matrix.hpp.

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

◆ new_() [2/4]

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

Definition at line 488 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 510 of file generic_matrix.hpp.

◆ rows() [1/2]

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

Definition at line 515 of file generic_matrix.hpp.

Referenced by new_(), and new_().

◆ columns() [1/2]

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

Definition at line 518 of file generic_matrix.hpp.

Referenced by add_row().

◆ row() [1/2]

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

Definition at line 523 of file generic_matrix.hpp.

References pineforge::GenericMatrix< T >::rows().

Referenced by add_col(), add_row(), get(), and set().

◆ col() [1/2]

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

Definition at line 534 of file generic_matrix.hpp.

References pineforge::GenericMatrix< T >::columns().

Referenced by get(), and set().

◆ add_row() [1/2]

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

Definition at line 547 of file generic_matrix.hpp.

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

◆ add_col() [1/2]

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

Definition at line 560 of file generic_matrix.hpp.

References pineforge::GenericMatrix< T >::columns(), and row().

◆ remove_row() [1/2]

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

◆ remove_col() [1/2]

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

◆ swap_rows() [1/2]

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

◆ swap_columns() [1/2]

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

◆ copy() [1/2]

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

◆ submatrix() [1/2]

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

◆ reshape() [1/2]

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

Definition at line 626 of file generic_matrix.hpp.

References pineforge::detail::reshape_impl().

◆ reverse() [1/2]

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

Definition at line 630 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 657 of file generic_matrix.hpp.

◆ elements_count() [1/2]

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

Definition at line 663 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 667 of file generic_matrix.hpp.

◆ snapshot() [1/2]

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

Definition at line 669 of file generic_matrix.hpp.

Referenced by restore().

◆ restore() [1/2]

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

Definition at line 674 of file generic_matrix.hpp.

References 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 174 of file generic_matrix.hpp.

◆ new_() [3/4]

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

Definition at line 200 of file generic_matrix.hpp.

◆ new_() [4/4]

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

Definition at line 208 of file generic_matrix.hpp.

◆ get() [2/2]

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

Definition at line 218 of file generic_matrix.hpp.

◆ set() [2/2]

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

Definition at line 227 of file generic_matrix.hpp.

◆ fill() [2/2]

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

Definition at line 236 of file generic_matrix.hpp.

◆ rows() [2/2]

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

Definition at line 240 of file generic_matrix.hpp.

◆ columns() [2/2]

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

Definition at line 243 of file generic_matrix.hpp.

◆ row() [2/2]

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

Definition at line 248 of file generic_matrix.hpp.

◆ col() [2/2]

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

Definition at line 255 of file generic_matrix.hpp.

◆ row_ref()

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

Definition at line 267 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 274 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 284 of file generic_matrix.hpp.

◆ remove_row() [2/2]

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

Definition at line 303 of file generic_matrix.hpp.

◆ remove_col() [2/2]

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

Definition at line 310 of file generic_matrix.hpp.

◆ swap_rows() [2/2]

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

Definition at line 317 of file generic_matrix.hpp.

◆ swap_columns() [2/2]

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

Definition at line 324 of file generic_matrix.hpp.

◆ copy() [2/2]

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

Definition at line 331 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 335 of file generic_matrix.hpp.

◆ transpose() [2/2]

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

Definition at line 351 of file generic_matrix.hpp.

◆ concat() [2/2]

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

Definition at line 358 of file generic_matrix.hpp.

◆ reshape() [2/2]

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

Definition at line 373 of file generic_matrix.hpp.

◆ reverse() [2/2]

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

Definition at line 379 of file generic_matrix.hpp.

◆ sort() [2/2]

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

Definition at line 384 of file generic_matrix.hpp.

◆ elements_count() [2/2]

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

Definition at line 392 of file generic_matrix.hpp.

◆ is_na() [2/2]

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

Definition at line 396 of file generic_matrix.hpp.

◆ snapshot() [2/2]

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

Definition at line 398 of file generic_matrix.hpp.

◆ restore() [2/2]

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

Definition at line 403 of file generic_matrix.hpp.


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