GNU Octave  8.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
sparse_params Class Reference

#include "oct-spparms.h"

Collaboration diagram for sparse_params:

Public Member Functions

 sparse_params (const sparse_params &)=default
 
 ~sparse_params (void)=default
 
sparse_paramsoperator= (const sparse_params &)=default
 

Static Public Member Functions

static void defaults (void)
 
static double get_bandden (void)
 
static double get_key (const std::string &key)
 
static string_vector get_keys (void)
 
static ColumnVector get_vals (void)
 
static bool instance_ok (void)
 
static void print_info (std::ostream &os, const std::string &prefix)
 
static bool set_key (const std::string &key, const double &val)
 
static bool set_vals (const Array< double > &vals)
 
static void tight (void)
 

Protected Member Functions

 sparse_params (void)
 

Private Member Functions

void do_defaults (void)
 
double do_get_bandden (void)
 
double do_get_key (const std::string &key)
 
string_vector do_get_keys (void) const
 
ColumnVector do_get_vals (void) const
 
void do_print_info (std::ostream &os, const std::string &prefix) const
 
bool do_set_key (const std::string &key, const double &val)
 
bool do_set_vals (const Array< double > &vals)
 
void do_tight (void)
 
void init_keys (void)
 

Static Private Member Functions

static void cleanup_instance (void)
 

Private Attributes

string_vector m_keys
 
ColumnVector m_params
 

Static Private Attributes

static sparse_paramss_instance = nullptr
 

Detailed Description

Definition at line 42 of file oct-spparms.h.

Constructor & Destructor Documentation

◆ sparse_params() [1/2]

sparse_params::sparse_params ( void  )
inlineprotected

Definition at line 46 of file oct-spparms.h.

Referenced by instance_ok().

◆ sparse_params() [2/2]

sparse_params::sparse_params ( const sparse_params )
default

◆ ~sparse_params()

sparse_params::~sparse_params ( void  )
default

Member Function Documentation

◆ cleanup_instance()

static void sparse_params::cleanup_instance ( void  )
inlinestaticprivate

Definition at line 90 of file oct-spparms.h.

Referenced by instance_ok().

◆ defaults()

void sparse_params::defaults ( void  )
static

Definition at line 55 of file oct-spparms.cc.

References do_defaults(), instance_ok(), and s_instance.

Referenced by Fspparms().

◆ do_defaults()

void sparse_params::do_defaults ( void  )
private

Definition at line 104 of file oct-spparms.cc.

References m_params.

Referenced by defaults().

◆ do_get_bandden()

double sparse_params::do_get_bandden ( void  )
private

Definition at line 155 of file oct-spparms.cc.

References m_params.

Referenced by get_bandden().

◆ do_get_key()

double sparse_params::do_get_key ( const std::string &  key)
private

Definition at line 188 of file oct-spparms.cc.

References m_keys, m_params, NaN, and OCTAVE_SPARSE_CONTROLS_SIZE.

Referenced by get_key().

◆ do_get_keys()

string_vector sparse_params::do_get_keys ( void  ) const
inlineprivate

Definition at line 100 of file oct-spparms.h.

Referenced by get_keys().

◆ do_get_vals()

ColumnVector sparse_params::do_get_vals ( void  ) const
inlineprivate

Definition at line 102 of file oct-spparms.h.

Referenced by get_vals().

◆ do_print_info()

void sparse_params::do_print_info ( std::ostream &  os,
const std::string &  prefix 
) const
private

Definition at line 199 of file oct-spparms.cc.

References m_keys, m_params, and OCTAVE_SPARSE_CONTROLS_SIZE.

Referenced by print_info().

◆ do_set_key()

bool sparse_params::do_set_key ( const std::string &  key,
const double &  val 
)
private

Definition at line 174 of file oct-spparms.cc.

References m_keys, m_params, and OCTAVE_SPARSE_CONTROLS_SIZE.

Referenced by set_key().

◆ do_set_vals()

bool sparse_params::do_set_vals ( const Array< double > &  vals)
private

Definition at line 160 of file oct-spparms.cc.

References len, m_params, Array< T, Alloc >::numel(), and OCTAVE_SPARSE_CONTROLS_SIZE.

Referenced by set_vals().

◆ do_tight()

void sparse_params::do_tight ( void  )
private

Definition at line 121 of file oct-spparms.cc.

References m_params.

Referenced by tight().

◆ get_bandden()

double sparse_params::get_bandden ( void  )
static

Definition at line 93 of file oct-spparms.cc.

References do_get_bandden(), instance_ok(), and s_instance.

◆ get_key()

double sparse_params::get_key ( const std::string &  key)
static

◆ get_keys()

string_vector sparse_params::get_keys ( void  )
static

Definition at line 67 of file oct-spparms.cc.

References do_get_keys(), instance_ok(), and s_instance.

Referenced by Fspparms().

◆ get_vals()

ColumnVector sparse_params::get_vals ( void  )
static

Definition at line 72 of file oct-spparms.cc.

References ColumnVector, do_get_vals(), instance_ok(), and s_instance.

Referenced by Fspparms().

◆ init_keys()

void sparse_params::init_keys ( void  )
private

Definition at line 138 of file oct-spparms.cc.

References m_keys.

◆ instance_ok()

bool sparse_params::instance_ok ( void  )
static

◆ operator=()

sparse_params& sparse_params::operator= ( const sparse_params )
default

◆ print_info()

void sparse_params::print_info ( std::ostream &  os,
const std::string &  prefix 
)
static

Definition at line 98 of file oct-spparms.cc.

References do_print_info(), instance_ok(), and s_instance.

Referenced by Fspparms().

◆ set_key()

bool sparse_params::set_key ( const std::string &  key,
const double &  val 
)
static

Definition at line 82 of file oct-spparms.cc.

References do_set_key(), instance_ok(), and s_instance.

Referenced by Fspparms().

◆ set_vals()

bool sparse_params::set_vals ( const Array< double > &  vals)
static

Definition at line 77 of file oct-spparms.cc.

References do_set_vals(), instance_ok(), and s_instance.

Referenced by Fspparms().

◆ tight()

void sparse_params::tight ( void  )
static

Definition at line 61 of file oct-spparms.cc.

References do_tight(), instance_ok(), and s_instance.

Referenced by Fspparms().

Member Data Documentation

◆ m_keys

string_vector sparse_params::m_keys
private

Definition at line 86 of file oct-spparms.h.

Referenced by do_get_key(), do_print_info(), do_set_key(), and init_keys().

◆ m_params

ColumnVector sparse_params::m_params
private

◆ s_instance

sparse_params * sparse_params::s_instance = nullptr
staticprivate

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