Proposals:Refactoring Statistics Framework 2007 Migration Users Guide: Difference between revisions
From KitwarePublic
Jump to navigationJump to search
Line 34: | Line 34: | ||
*** GetInstanceIdentifier() now returns the integer distance to the Begin() element. Before it used to return the index of the instance in the real sample. | *** GetInstanceIdentifier() now returns the integer distance to the Begin() element. Before it used to return the index of the instance in the real sample. | ||
*** Iterator& operator+(int n) and Iterator& operator-(int n) were removed. The methods were not used, and they were not consistent with other containers. They were also unsafe, given that with Begin() and End() there is no way to verify if an iterator has moved before Begin() or after End() (unless we rely on being aware of the underlying pointer implementation of the Iterators, which would be a violation of the class encapsulation). | *** Iterator& operator+(int n) and Iterator& operator-(int n) were removed. The methods were not used, and they were not consistent with other containers. They were also unsafe, given that with Begin() and End() there is no way to verify if an iterator has moved before Begin() or after End() (unless we rely on being aware of the underlying pointer implementation of the Iterators, which would be a violation of the class encapsulation). | ||
*** Constructor ConstIterator(typename InstanceIdentifierHolder::const_iterator iter, const Self* classSample) was made protected, since this constructor must only be called by the Sample owner class. | |||
** ConstIterator | ** ConstIterator | ||
*** removing Friendship to the Iterator | *** removing Friendship to the Iterator | ||
Line 45: | Line 47: | ||
* Iterators | * Iterators | ||
** Now the non-const Iterator derives from the ConstIterator | ** Now the non-const Iterator derives from the ConstIterator | ||
** Methods declared protected and purposely not implemented | |||
*** Default constructor: This was a safety risk since it contained uninitialized variables | |||
*** The following method are in this category to enforce const correctness. All of them could have offered ways of removing constness without warning | |||
**** Iterator(const Self * sample); | |||
**** Iterator(typename InstanceIdentifierHolder::const_iterator iter, const Self* classSample); | |||
**** Iterator(const ConstIterator & it); | |||
**** ConstIterator& operator=(const ConstIterator& it); | |||
|- | |- | ||
| ListSampleBase || Deprecated. The class was unecessary, it was providing only a Search() method that should in fact be provided by a process class, not a data container. | | ListSampleBase || Deprecated. The class was unecessary, it was providing only a Search() method that should in fact be provided by a process class, not a data container. |
Revision as of 19:08, 23 April 2007
How To Migrate your code to the New Statistics Framework
Measurement Containers
Class Name | Fate | Deprecated API | New API |
---|---|---|---|
Sample | Refactored |
|
|
Subsample | Refactored |
|
|
ListSampleBase | Deprecated. The class was unecessary, it was providing only a Search() method that should in fact be provided by a process class, not a data container. |
|
|
ListSample | Refactored | The iterators API was updated, const-correctness is now enforced | |
MembershipSample | Refactored |
|
|
Histogram | Refactored | ||
VariableDimensionHistogram | |||
KdTree | Refactored |
Frequency Containers
Class Name | Fate | Deprecated API | New API |
---|---|---|---|
DenseFrequencyContainer | |||
SparseFrequencyContainer |
Process Objects
Class Name | Fate | Deprecated API | New API |
---|---|---|---|
SampleClassifier | |||
SampleClassifierWithMask |
Traits
Class Name | Fate | Deprecated API | New API |
---|---|---|---|
MeasurementVectorTraits | Refactored (same name) |
|
MeanShift
Class Name | Fate | Deprecated API | New API |
---|---|---|---|
Adaptors
Class Name | Fate | Deprecated API | New API |
---|---|---|---|
Univariate Distributions
Class Name | Fate | Deprecated API | New API |
---|---|---|---|
Algorithms
Class Name | Fate | Deprecated API | New API |
---|---|---|---|
Calculators
Class Name | Fate | Deprecated API | New API |
---|---|---|---|
CovarianceCalculator | Refactored into CovarianceFilter | SetMean() because it was inconsistent | GetOutput(), SetInput(), GetMean() |
GreyLevelCooccurrenceMatrixTextureCoefficientsCalculator | Refactored into HistogramToTextureFeaturesFilter | now derives from ProcessObject, SetInput(), GetOutput() | |
MeanCalculator | Refactored into MeanFilter | SetSample() method replaced with SetInput() | now derives from ProcessObject |
ScalarImageTextureCalculator | Refactored into (???Filter) | ||
WeightedCovarianceCalculator | Refactored into WeightedCovarianceFilter |
|
|
WeightedMeanCalculator | Refactored into WeightedMeanFilter |
|
|
Generators
Class Name | Fate | Deprecated API | New API |
---|---|---|---|
Filters
Class Name | Fate | Deprecated API | New API |
---|---|---|---|
Multivariate Density Functions
Class Name | Fate | Deprecated API | New API |
---|---|---|---|
Distance Metrics
Class Name | Fate | Deprecated API | New API |
---|---|---|---|
Components
Class Name | Fate | Deprecated API | New API |
---|---|---|---|
Estimators
Class Name | Fate | Deprecated API | New API |
---|---|---|---|