featurevector.h File Reference

Feature helper function declarations More...

#include "../Features/Feature.h"

Go to the source code of this file.

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 function declarations

© 2003-2004 by Rene Mayrhofer, Harald Radi

Date
2004-02-23 12:24:40 +0100 (Mon, 23 Feb 2004)
Revision
635

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.h 635 2004-02-23 11:24:40Z 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