svm_matrix.cpp File Reference

#include <vector>
#include <string>
#include <fstream>
#include <iostream>
#include "svm_common.h"
#include "plugin.h"
#include <limits.h>

Go to the source code of this file.

Namespaces

namespace  std

Defines

#define fixed_point_shift   USHRT_MAX
#define fixed_point_type   unsigned short

Functions

void read_input_parameters (int, char **, char *, char *, char *, long *, long *, KERNEL_PARM *, long *, long *, long *)
void wait_any_key ()
void print_help ()
void setValue (void *matrix, long i, long j, float value, long no_cols, long fixed_point)
float getValue (void *matrix, long i, long j, long no_cols, long fixed_point)
void printValue (FILE *fp, void *value, long offset, long fixed_point, long binary)
void free_documents (DOC **docs, double *target, long totdoc)
long getNoRows (const vector< string > &docfile)
float * symmetric_matrix (void *matrix, DOC **docs, long totdoc, long offset, KERNEL_PARM *kernel_parm_p, long normalize, long fixed_point)
void symmetric_matrix (void *matrix, float *diag_c, DOC **docs_r, long totdoc_r, long offset_r, DOC **docs_c, long totdoc_c, long offset_c, KERNEL_PARM *kernel_parm_p, long normalize, long fixed_point)
void * symmetric_matrix (const vector< string > &docfile, long verbosity, long normalize, KERNEL_PARM *kernel_parm_p, long fixed_point, long *no_rows)
void asymmetric_matrix (void *matrix, DOC **docs_r, long totdoc_r, long offset_r, DOC **docs_c, long totdoc_c, long offset_c, long nocols, KERNEL_PARM *kernel_parm_p, long normalize, long fixed_point)
void * asymmetric_matrix (const vector< string > &docfile_r, const vector< string > &docfile_c, long verbosity, long normalize, KERNEL_PARM *kernel_parm_p, long fixed_point, long *no_rows, long *no_cols)
void print_matrix (const char *matrixfile, void *matrix, long fixed_point, long no_rows, long no_cols, long binary, long lower_traingular)
void getStringList (string buf, vector< string > &list)
void read_input_parameters (int argc, char *argv[], string &matrixfile, vector< string > &docfile_r, vector< string > &docfile_c, long *verbosity, long *normalize, KERNEL_PARM *kernel_parm, long *fixed_point, long *binary, long *lower_triangular)
int main (int argc, char *argv[])


Define Documentation

#define fixed_point_shift   USHRT_MAX

Definition at line 14 of file svm_matrix.cpp.

Referenced by getValue(), and setValue().

#define fixed_point_type   unsigned short

Definition at line 15 of file svm_matrix.cpp.

Referenced by asymmetric_matrix(), printValue(), setValue(), and symmetric_matrix().


Function Documentation

void* asymmetric_matrix ( const vector< string > &  docfile_r,
const vector< string > &  docfile_c,
long  verbosity,
long  normalize,
KERNEL_PARM *  kernel_parm_p,
long  fixed_point,
long *  no_rows,
long *  no_cols 
)

Definition at line 322 of file svm_matrix.cpp.

References asymmetric_matrix(), fixed_point_type, free_documents(), and getNoRows().

void asymmetric_matrix ( void *  matrix,
DOC **  docs_r,
long  totdoc_r,
long  offset_r,
DOC **  docs_c,
long  totdoc_c,
long  offset_c,
long  nocols,
KERNEL_PARM *  kernel_parm_p,
long  normalize,
long  fixed_point 
)

Definition at line 294 of file svm_matrix.cpp.

References setValue().

Referenced by asymmetric_matrix(), and main().

void free_documents ( DOC **  docs,
double *  target,
long  totdoc 
)

Definition at line 179 of file svm_matrix.cpp.

Referenced by asymmetric_matrix(), and symmetric_matrix().

long getNoRows ( const vector< string > &  docfile  ) 

Definition at line 187 of file svm_matrix.cpp.

Referenced by asymmetric_matrix(), and symmetric_matrix().

void getStringList ( string  buf,
vector< string > &  list 
)

Definition at line 407 of file svm_matrix.cpp.

Referenced by read_input_parameters().

float getValue ( void *  matrix,
long  i,
long  j,
long  no_cols,
long  fixed_point 
)

Definition at line 40 of file svm_matrix.cpp.

References fixed_point_shift.

int main ( int  argc,
char *  argv[] 
)

Definition at line 534 of file svm_matrix.cpp.

References asymmetric_matrix(), plugin_init(), plugin_kernel_setparm(), print_matrix(), read_input_parameters(), and symmetric_matrix().

void print_help (  ) 

Definition at line 486 of file svm_matrix.cpp.

References wait_any_key().

Referenced by read_input_parameters().

void print_matrix ( const char *  matrixfile,
void *  matrix,
long  fixed_point,
long  no_rows,
long  no_cols,
long  binary,
long  lower_traingular 
)

Definition at line 369 of file svm_matrix.cpp.

References printValue().

Referenced by main().

void printValue ( FILE *  fp,
void *  value,
long  offset,
long  fixed_point,
long  binary 
)

Definition at line 54 of file svm_matrix.cpp.

References fixed_point_type.

Referenced by print_matrix().

void read_input_parameters ( int  argc,
char *  argv[],
string &  matrixfile,
vector< string > &  docfile_r,
vector< string > &  docfile_c,
long *  verbosity,
long *  normalize,
KERNEL_PARM *  kernel_parm,
long *  fixed_point,
long *  binary,
long *  lower_triangular 
)

Definition at line 419 of file svm_matrix.cpp.

References getStringList(), print_help(), and wait_any_key().

void read_input_parameters ( int  ,
char **  ,
char *  ,
char *  ,
char *  ,
long *  ,
long *  ,
KERNEL_PARM *  ,
long *  ,
long *  ,
long *   
)

Referenced by main().

void setValue ( void *  matrix,
long  i,
long  j,
float  value,
long  no_cols,
long  fixed_point 
)

Definition at line 26 of file svm_matrix.cpp.

References fixed_point_shift, and fixed_point_type.

Referenced by asymmetric_matrix(), and symmetric_matrix().

void* symmetric_matrix ( const vector< string > &  docfile,
long  verbosity,
long  normalize,
KERNEL_PARM *  kernel_parm_p,
long  fixed_point,
long *  no_rows 
)

Definition at line 254 of file svm_matrix.cpp.

References fixed_point_type, free_documents(), getNoRows(), and symmetric_matrix().

void symmetric_matrix ( void *  matrix,
float *  diag_c,
DOC **  docs_r,
long  totdoc_r,
long  offset_r,
DOC **  docs_c,
long  totdoc_c,
long  offset_c,
KERNEL_PARM *  kernel_parm_p,
long  normalize,
long  fixed_point 
)

Definition at line 230 of file svm_matrix.cpp.

References setValue().

float* symmetric_matrix ( void *  matrix,
DOC **  docs,
long  totdoc,
long  offset,
KERNEL_PARM *  kernel_parm_p,
long  normalize,
long  fixed_point 
)

Definition at line 202 of file svm_matrix.cpp.

References setValue().

Referenced by main(), and symmetric_matrix().

void wait_any_key (  ) 

Definition at line 480 of file svm_matrix.cpp.

Referenced by print_help(), and read_input_parameters().


Generated on Wed Sep 5 17:26:48 2007 for SVM-Dlight by  doxygen 1.5.1