Skip to content

Commit

Permalink
IntFeatureSpace: Remove unused DeSerialize method
Browse files Browse the repository at this point in the history
The Serialize method is used indirectly by MasterTrainer::Serialize,
but there is no corresponding MasterTrainer::DeSerialize.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
  • Loading branch information
stweil committed Jul 18, 2018
1 parent f47daac commit 2b6a356
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
13 changes: 0 additions & 13 deletions src/classify/intfeaturespace.cpp
Expand Up @@ -44,19 +44,6 @@ bool IntFeatureSpace::Serialize(FILE* fp) const {
return true;
}

// DeSerializes the feature space definition from the given file.
// If swap is true, the data is big/little-endian swapped.
// Returns false on error.
bool IntFeatureSpace::DeSerialize(bool swap, FILE* fp) {
if (fread(&x_buckets_, sizeof(x_buckets_), 1, fp) != 1)
return false;
if (fread(&y_buckets_, sizeof(y_buckets_), 1, fp) != 1)
return false;
if (fread(&theta_buckets_, sizeof(theta_buckets_), 1, fp) != 1)
return false;
return true;
}

// Returns an INT_FEATURE_STRUCT corresponding to the given index.
// This is the inverse of the Index member.
INT_FEATURE_STRUCT IntFeatureSpace::PositionFromIndex(int index) const {
Expand Down
5 changes: 0 additions & 5 deletions src/classify/intfeaturespace.h
Expand Up @@ -47,11 +47,6 @@ class IntFeatureSpace {
// Returns false on error.
bool Serialize(FILE* fp) const;

// DeSerializes the feature space definition from the given file.
// If swap is true, the data is big/little-endian swapped.
// Returns false on error.
bool DeSerialize(bool swap, FILE* fp);

// Returns the total size of the feature space.
int Size() const {
return static_cast<int>(x_buckets_) * y_buckets_ * theta_buckets_;
Expand Down

0 comments on commit 2b6a356

Please sign in to comment.