Skip to content

Commit

Permalink
remove generic type by hand
Browse files Browse the repository at this point in the history
  • Loading branch information
karlnapf committed Jul 18, 2013
1 parent b757a6d commit a384e6b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 18 deletions.
34 changes: 16 additions & 18 deletions src/shogun/features/RealFileFeatures.cpp
Expand Up @@ -20,44 +20,42 @@ using namespace shogun;
CRealFileFeatures::CRealFileFeatures()
{
SG_UNSTABLE("CRealFileFeatures::CRealFileFeatures()", "\n")

working_file=NULL;
working_filename=strdup("");
intlen=0;
doublelen=0;
endian=0;
fourcc=0;
preprocd=0;
labels=NULL;
status=false;
init();
}

CRealFileFeatures::CRealFileFeatures(int32_t size, char* fname)
: CDenseFeatures<float64_t>(size)
{
init();

working_file=fopen(fname, "r");
working_filename=strdup(fname);
ASSERT(working_file)
intlen=0;
doublelen=0;
endian=0;
fourcc=0;
preprocd=0;
labels=NULL;
status=load_base_data();
}

CRealFileFeatures::CRealFileFeatures(int32_t size, FILE* file)
: CDenseFeatures<float64_t>(size), working_file(file), working_filename(NULL)
: CDenseFeatures<float64_t>(size)
{
init();

ASSERT(working_file)
status=load_base_data();
}

void CRealFileFeatures::init()
{
working_file=NULL;
working_filename=strdup("");
intlen=0;
doublelen=0;
endian=0;
fourcc=0;
preprocd=0;
labels=NULL;
status=load_base_data();
status=false;

unset_generic();
}

CRealFileFeatures::~CRealFileFeatures()
Expand Down
4 changes: 4 additions & 0 deletions src/shogun/features/RealFileFeatures.h
Expand Up @@ -80,6 +80,10 @@ class CRealFileFeatures: public CDenseFeatures<float64_t>
*/
bool load_base_data();

private:
/** initialises members */
void init();

protected:
/** working file */
FILE* working_file;
Expand Down

0 comments on commit a384e6b

Please sign in to comment.