SHOGUN  6.1.3
List of all members | Public Member Functions | Public Attributes
SGString< T > Class Template Reference

Detailed Description

template<class T>
class shogun::SGString< T >

shogun string

Definition at line 25 of file base/Parameter.h.

Public Member Functions

 SGString ()
 SGString (T *s, index_t l, bool free_s=false)
 SGString (SGVector< T > v)
 SGString (index_t len, bool free_s=false)
 SGString (const SGString &orig)
bool operator== (const SGString &other) const
void free_string ()
void destroy_string ()
SGString< T > get ()
void load (CFile *loader)
void save (CFile *saver)

Public Attributes

T * string
index_t slen
bool do_free

Constructor & Destructor Documentation

◆ SGString() [1/5]

SGString ( )

default constructor

Definition at line 11 of file SGString.cpp.

◆ SGString() [2/5]

SGString ( T *  s,
index_t  l,
bool  free_s = false 

constructor for setting params

Definition at line 14 of file SGString.cpp.

◆ SGString() [3/5]

SGString ( SGVector< T >  v)

constructor for setting params from a SGVector

Definition at line 18 of file SGString.cpp.

◆ SGString() [4/5]

SGString ( index_t  len,
bool  free_s = false 

constructor to create new string in memory

Definition at line 22 of file SGString.cpp.

◆ SGString() [5/5]

SGString ( const SGString< T > &  orig)

copy constructor

Definition at line 29 of file SGString.cpp.

Member Function Documentation

◆ destroy_string()

void destroy_string ( )

destroy string

Definition at line 59 of file SGString.cpp.

◆ free_string()

void free_string ( )

free string

Definition at line 48 of file SGString.cpp.

◆ get()

SGString<T> get ( )

get the string (no copying is done here)

the refcount increased string

Definition at line 58 of file SGString.h.

◆ load()

void load ( CFile loader)

load string from file

loaderFile object via which to load data

Definition at line 65 of file SGString.cpp.

◆ operator==()

bool operator== ( const SGString< T > &  other) const

equality operator

Definition at line 33 of file SGString.cpp.

◆ save()

void save ( CFile saver)

save string to file

saverFile object via which to save data

Definition at line 76 of file SGString.cpp.

Member Data Documentation

◆ do_free

bool do_free

whether string needs to be freed

Definition at line 81 of file SGString.h.

◆ slen

index_t slen

length of string

Definition at line 79 of file SGString.h.

◆ string

T* string


Definition at line 77 of file SGString.h.

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

SHOGUN Machine Learning Toolbox - Documentation