Skip to content

Commit

Permalink
once override then all override
Browse files Browse the repository at this point in the history
otherwise clang will throw a lot of warnings and hence CIs will die
  • Loading branch information
vigsterkr committed Jul 25, 2018
1 parent ca213d9 commit 32c895a
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 26 deletions.
8 changes: 4 additions & 4 deletions src/shogun/labels/BinaryLabels.h
Expand Up @@ -88,13 +88,13 @@ class CBinaryLabels : public CDenseLabels
*
* @param context optional message to convey the context
*/
virtual void ensure_valid(const char * context = NULL);
virtual void ensure_valid(const char * context = NULL) override;

/** get label type
*
* @return label type binary
*/
virtual ELabelType get_label_type() const;
virtual ELabelType get_label_type() const override;

/** Converts all scores to calibrated probabilities by fitting a
* sigmoid function using the method described in
Expand All @@ -117,13 +117,13 @@ class CBinaryLabels : public CDenseLabels
void scores_to_probabilities(float64_t a = 0, float64_t b = 0);

/** @return object name */
virtual const char * get_name() const
virtual const char * get_name() const override
{
return "BinaryLabels";
}

#ifndef SWIG // SWIG should skip this part
virtual CLabels* shallow_subset_copy();
virtual CLabels* shallow_subset_copy() override;
#endif
};

Expand Down
6 changes: 3 additions & 3 deletions src/shogun/labels/DenseLabels.h
Expand Up @@ -56,7 +56,7 @@ namespace shogun
CDenseLabels(CFile* loader);

/** destructor */
virtual ~CDenseLabels();
virtual ~CDenseLabels() override;

virtual bool is_valid() const override;

Expand All @@ -74,15 +74,15 @@ namespace shogun
*
* @param loader File object via which to load data
*/
virtual void load(CFile* loader);
virtual void load(CFile* loader) override;

/** save labels to file
*
* not possible with subset
*
* @param writer File object via which to save data
*/
virtual void save(CFile* writer);
virtual void save(CFile* writer) override;

/** set label
*
Expand Down
12 changes: 6 additions & 6 deletions src/shogun/labels/LatentLabels.h
@@ -1,7 +1,7 @@
/*
* This software is distributed under BSD 3-clause license (see LICENSE file).
*
* Authors: Viktor Gal, Evgeniy Andreev, Yuyu Zhang, Fernando Iglesias,
* Authors: Viktor Gal, Evgeniy Andreev, Yuyu Zhang, Fernando Iglesias,
* Sergey Lisitsyn, Soeren Sonnenburg
*/

Expand Down Expand Up @@ -39,7 +39,7 @@ namespace shogun
CLatentLabels(CLabels* labels);

/** destructor */
virtual ~CLatentLabels();
virtual ~CLatentLabels() override;

/** get all the stored latent labels
*
Expand Down Expand Up @@ -76,25 +76,25 @@ namespace shogun
*
* @param context optional message to convey the context
*/
virtual void ensure_valid(const char* context=NULL);
virtual void ensure_valid(const char* context=NULL) override;

/** get label type
*
* @return label type (binary, multiclass, ...)
*/
virtual ELabelType get_label_type() const { return LT_LATENT; }
virtual ELabelType get_label_type() const override { return LT_LATENT; }

/** Returns the name of the SGSerializable instance.
*
* @return name of the SGSerializable
*/
virtual const char* get_name() const { return "LatentLabels"; }
virtual const char* get_name() const override { return "LatentLabels"; }

/** get the number of stored labels
*
* @return the number of labels
*/
virtual int32_t get_num_labels() const;
virtual int32_t get_num_labels() const override;

/** set labels
*
Expand Down
8 changes: 4 additions & 4 deletions src/shogun/labels/MultilabelLabels.h
Expand Up @@ -84,13 +84,13 @@ class CMultilabelLabels : public CLabels
*
* @return label type multiclass
*/
virtual ELabelType get_label_type() const
virtual ELabelType get_label_type() const override
{
return LT_SPARSE_MULTILABEL;
}

/** @return object name */
virtual const char * get_name() const
virtual const char * get_name() const override
{
return "MultilabelLabels";
}
Expand All @@ -99,13 +99,13 @@ class CMultilabelLabels : public CLabels
*
* @return the number of labels
*/
virtual int32_t get_num_labels() const;
virtual int32_t get_num_labels() const override;

/** return number of classes (per label)
*
* @return number of classes
*/
virtual int32_t get_num_classes() const;
virtual int32_t get_num_classes() const override;

/** set labels
*
Expand Down
18 changes: 9 additions & 9 deletions src/shogun/labels/StructuredLabels.h
@@ -1,7 +1,7 @@
/*
* This software is distributed under BSD 3-clause license (see LICENSE file).
*
* Authors: Fernando Iglesias, Thoralf Klein, Evgeniy Andreev, Yuyu Zhang,
* Authors: Fernando Iglesias, Thoralf Klein, Evgeniy Andreev, Yuyu Zhang,
* Bjoern Esser
*/

Expand Down Expand Up @@ -37,7 +37,7 @@ class CStructuredLabels : public CLabels
CStructuredLabels(int32_t num_labels);

/** destructor */
virtual ~CStructuredLabels();
virtual ~CStructuredLabels() override;

virtual bool is_valid() const override;

Expand All @@ -47,7 +47,7 @@ class CStructuredLabels : public CLabels
*
* @return if labeling is valid
*/
virtual void ensure_valid(const char* context = NULL);
virtual void ensure_valid(const char* context = NULL) override;

/**
* add a new label to the vector of labels, effectively
Expand All @@ -57,7 +57,7 @@ class CStructuredLabels : public CLabels
*
* @param label label to add
*/
virtual void add_label(CStructuredData* label);
virtual void add_label(CStructuredData* label) override;

/** get labels
*
Expand All @@ -73,7 +73,7 @@ class CStructuredLabels : public CLabels
*
* @return label object
*/
virtual CStructuredData* get_label(int32_t idx);
virtual CStructuredData* get_label(int32_t idx) override;

/**
* set label, possible with subset. This method should be used
Expand All @@ -85,22 +85,22 @@ class CStructuredLabels : public CLabels
*
* @return if setting was successful
*/
virtual bool set_label(int32_t idx, CStructuredData* label);
virtual bool set_label(int32_t idx, CStructuredData* label) override;

/** get number of labels, depending on wheter a subset is set
*
* @return number of labels
*/
virtual int32_t get_num_labels() const;
virtual int32_t get_num_labels() const override;

/** @return object name */
virtual const char* get_name() const { return "StructuredLabels"; }
virtual const char* get_name() const override { return "StructuredLabels"; }

/** get label type
*
* @return label type LT_STRUCTURED
*/
virtual ELabelType get_label_type() const { return LT_STRUCTURED; }
virtual ELabelType get_label_type() const override { return LT_STRUCTURED; }

/** get structured data type the labels are composed of
*
Expand Down

0 comments on commit 32c895a

Please sign in to comment.