My Project  debian-1:4.1.1-p2+ds-4
Public Member Functions | Data Fields
SparseRow< number_type > Class Template Reference

#include <tgb_internal.h>

Public Member Functions

 SparseRow ()
 
 SparseRow (int n)
 
 SparseRow (int n, const number_type *source)
 
 ~SparseRow ()
 

Data Fields

int * idx_array
 
number_type * coef_array
 
int len
 

Detailed Description

template<class number_type>
class SparseRow< number_type >

Definition at line 509 of file tgb_internal.h.

Constructor & Destructor Documentation

◆ SparseRow() [1/3]

template<class number_type>
SparseRow< number_type >::SparseRow ( )
inline

Definition at line 515 of file tgb_internal.h.

517  {
518  len=0;
519  idx_array=NULL;

◆ SparseRow() [2/3]

template<class number_type>
SparseRow< number_type >::SparseRow ( int  n)
inline

Definition at line 521 of file tgb_internal.h.

523  {
524  len=n;
525  idx_array=(int*) omAlloc(n*sizeof(int));
526  coef_array=(number_type*) omAlloc(n*sizeof(number_type));

◆ SparseRow() [3/3]

template<class number_type>
SparseRow< number_type >::SparseRow ( int  n,
const number_type *  source 
)
inline

Definition at line 527 of file tgb_internal.h.

529  {
530  len=n;
531  idx_array=NULL;
532  coef_array=(number_type*) omAlloc(n*sizeof(number_type));
533  memcpy(coef_array,source,n*sizeof(number_type));

◆ ~SparseRow()

template<class number_type>
SparseRow< number_type >::~SparseRow ( )
inline

Definition at line 534 of file tgb_internal.h.

536  {
537  omfree(idx_array);

Field Documentation

◆ coef_array

template<class number_type>
number_type* SparseRow< number_type >::coef_array

Definition at line 513 of file tgb_internal.h.

◆ idx_array

template<class number_type>
int* SparseRow< number_type >::idx_array

Definition at line 512 of file tgb_internal.h.

◆ len

template<class number_type>
int SparseRow< number_type >::len

Definition at line 514 of file tgb_internal.h.


The documentation for this class was generated from the following file:
SparseRow::coef_array
number_type * coef_array
Definition: tgb_internal.h:513
omAlloc
#define omAlloc(size)
Definition: omAllocDecl.h:208
SparseRow::len
int len
Definition: tgb_internal.h:514
SparseRow::idx_array
int * idx_array
Definition: tgb_internal.h:512
NULL
#define NULL
Definition: omList.c:9
omfree
#define omfree(addr)
Definition: omAllocDecl.h:235