featurevector.cpp File Reference

Feature helper functions More...

#include "featurevector.h"

Functions

char * strsplit (char *str, const char sep)
string serializeFeatureVector (const featurevector &samples)
size_t unserializeFeatureVector (const featurevector &features, featurevector &samples, char *data)


Detailed Description

Feature helper functions

© 2003-2004 by Rene Mayrhofer, Harald Radi

Date
2004-03-12 11:55:21 +0100 (Fre, 12 Mär 2004)
Revision
691

Since:
Thu Aug 28 2003
Author:
Rene Mayrhofer <rene@mayrhofer.eu.org>

Harald Radi <harald.radi@nme.at>


This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

Id
featurevector.cpp 691 2004-03-12 10:55:21Z rene

Function Documentation

string serializeFeatureVector const featurevector samples  ) 
 

These are just two helper functions for serializing and deserializing a whole feature vector just returns, for a given feature vector, the serialized, correctly escaped form with ';' as delimiter

char* strsplit char *  str,
const char  sep
 

A very short helper for replacing the brain-damaged strtok (which can't handle empty tokens)

Parameters:
str String to be tokenized, NULL on subsequent calls
sep Separator
Returns:
A valid token on success, NULL if the string can't be tokenized
Remarks:
This function alters the string passed as parameter str.

size_t unserializeFeatureVector const featurevector features,
featurevector samples,
char *  data
 

Todo:
catch "[invalid]" entries in the file and de-escape ";", "\", "[" and "]"


Generated on Mon Jun 5 10:20:48 2006 for Intelligence.kdevelop by  doxygen 1.4.6