diff --git a/src/shogun/labels/BinaryLabels.h b/src/shogun/labels/BinaryLabels.h index d144a44e008..7b94ef6673b 100644 --- a/src/shogun/labels/BinaryLabels.h +++ b/src/shogun/labels/BinaryLabels.h @@ -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 @@ -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 }; diff --git a/src/shogun/labels/DenseLabels.h b/src/shogun/labels/DenseLabels.h index 8cf4c024cd1..01d7f4eb0be 100644 --- a/src/shogun/labels/DenseLabels.h +++ b/src/shogun/labels/DenseLabels.h @@ -56,7 +56,7 @@ namespace shogun CDenseLabels(CFile* loader); /** destructor */ - virtual ~CDenseLabels(); + virtual ~CDenseLabels() override; virtual bool is_valid() const override; @@ -74,7 +74,7 @@ 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 * @@ -82,7 +82,7 @@ namespace shogun * * @param writer File object via which to save data */ - virtual void save(CFile* writer); + virtual void save(CFile* writer) override; /** set label * diff --git a/src/shogun/labels/LatentLabels.h b/src/shogun/labels/LatentLabels.h index b12f7f27297..113a9696341 100644 --- a/src/shogun/labels/LatentLabels.h +++ b/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 */ @@ -39,7 +39,7 @@ namespace shogun CLatentLabels(CLabels* labels); /** destructor */ - virtual ~CLatentLabels(); + virtual ~CLatentLabels() override; /** get all the stored latent labels * @@ -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 * diff --git a/src/shogun/labels/MultilabelLabels.h b/src/shogun/labels/MultilabelLabels.h index 16642df5b00..f90d6fe9bfc 100644 --- a/src/shogun/labels/MultilabelLabels.h +++ b/src/shogun/labels/MultilabelLabels.h @@ -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"; } @@ -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 * diff --git a/src/shogun/labels/StructuredLabels.h b/src/shogun/labels/StructuredLabels.h index ef71ceed76d..fa75d65b634 100644 --- a/src/shogun/labels/StructuredLabels.h +++ b/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 */ @@ -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; @@ -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 @@ -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 * @@ -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 @@ -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 *