Public Member Functions | Protected Attributes

CVwNativeCacheReader Class Reference


Detailed Description

Class CVwNativeCacheReader reads from a cache exactly as that which has been produced by VW's default cache format.

It is compatible with VW version 5.1.

Definition at line 39 of file VwNativeCacheReader.h.

Inheritance diagram for CVwNativeCacheReader:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 CVwNativeCacheReader ()
 CVwNativeCacheReader (char *fname, CVwEnvironment *env_to_use)
 CVwNativeCacheReader (int32_t f, CVwEnvironment *env_to_use)
virtual ~CVwNativeCacheReader ()
virtual void set_file (int32_t f)
virtual bool read_cached_example (VwExample *const ae)
void check_cache_metadata ()
virtual const char * get_name () const

Protected Attributes

CIOBuffer buf
 Buffer to read from.

Constructor & Destructor Documentation

Default constructor

Definition at line 20 of file VwNativeCacheReader.cpp.

CVwNativeCacheReader ( char *  fname,
CVwEnvironment env_to_use 
)

Constructor, opens a file whose name is specified

Parameters:
fname file name
env_to_use Environment to use

Definition at line 26 of file VwNativeCacheReader.cpp.

CVwNativeCacheReader ( int32_t  f,
CVwEnvironment env_to_use 
)

Constructor, passed a file descriptor

Parameters:
f descriptor of opened file
env_to_use Environment to use

Definition at line 34 of file VwNativeCacheReader.cpp.

~CVwNativeCacheReader (  )  [virtual]

Destructor

Definition at line 42 of file VwNativeCacheReader.cpp.


Member Function Documentation

void check_cache_metadata (  ) 

Check whether cache is readable

Definition at line 63 of file VwNativeCacheReader.cpp.

virtual const char* get_name ( void   )  const [virtual]

Return the name of the object.

Returns:
VwNativeCacheReader

Reimplemented from CVwCacheReader.

Definition at line 92 of file VwNativeCacheReader.h.

bool read_cached_example ( VwExample *const   ae  )  [virtual]

Read one cached example

Returns:
example as VwExample*

Implements CVwCacheReader.

Definition at line 139 of file VwNativeCacheReader.cpp.

void set_file ( int32_t  f  )  [virtual]

Set the file descriptor to use

Parameters:
f descriptor of cache file

Reimplemented from CVwCacheReader.

Definition at line 47 of file VwNativeCacheReader.cpp.


Member Data Documentation

CIOBuffer buf [protected]

Buffer to read from.

Definition at line 153 of file VwNativeCacheReader.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation