My Project
Loading...
Searching...
No Matches
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 496 of file tgb_internal.h.

Constructor & Destructor Documentation

◆ SparseRow() [1/3]

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

Definition at line 502 of file tgb_internal.h.

503 {
504 len=0;
507 }
number_type * coef_array
Definition: tgb_internal.h:500
int * idx_array
Definition: tgb_internal.h:499
#define NULL
Definition: omList.c:12

◆ SparseRow() [2/3]

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

Definition at line 502 of file tgb_internal.h.

509 {
510 len=n;
511 idx_array=(int*) omAlloc(n*sizeof(int));
512 coef_array=(number_type*) omAlloc(n*sizeof(number_type));
513 }
#define omAlloc(size)
Definition: omAllocDecl.h:210

◆ SparseRow() [3/3]

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

Definition at line 502 of file tgb_internal.h.

515 {
516 len=n;
518 coef_array=(number_type*) omAlloc(n*sizeof(number_type));
519 memcpy(coef_array,source,n*sizeof(number_type));
520 }

◆ ~SparseRow()

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

Definition at line 502 of file tgb_internal.h.

522 {
525 }
#define omfree(addr)
Definition: omAllocDecl.h:237

Field Documentation

◆ coef_array

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

Definition at line 500 of file tgb_internal.h.

◆ idx_array

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

Definition at line 499 of file tgb_internal.h.

◆ len

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

Definition at line 501 of file tgb_internal.h.


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