Viskores  1.0
Entropy.h
Go to the documentation of this file.
1 //============================================================================
2 // The contents of this file are covered by the Viskores license. See
3 // LICENSE.txt for details.
4 //
5 // By contributing to this file, all contributors agree to the Developer
6 // Certificate of Origin Version 1.1 (DCO 1.1) as stated in DCO.txt.
7 //============================================================================
8 
9 //============================================================================
10 // Copyright (c) Kitware, Inc.
11 // All rights reserved.
12 // See LICENSE.txt for details.
13 //
14 // This software is distributed WITHOUT ANY WARRANTY; without even
15 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
16 // PURPOSE. See the above copyright notice for more information.
17 //============================================================================
18 
19 #ifndef viskores_filter_density_estimate_Entropy_h
20 #define viskores_filter_density_estimate_Entropy_h
21 
22 #include <viskores/filter/Filter.h>
24 
25 namespace viskores
26 {
27 namespace filter
28 {
29 namespace density_estimate
30 {
35 class VISKORES_FILTER_DENSITY_ESTIMATE_EXPORT Entropy : public viskores::filter::Filter
36 {
37 public:
38  //currently the Entropy filter only works on scalar data.
40 
41  //Construct a histogram which is used to compute the entropy with a default of 10 bins
43  Entropy();
44 
46  void SetNumberOfBins(viskores::Id count) { this->NumberOfBins = count; }
48  viskores::Id GetNumberOfBins() const { return this->NumberOfBins; }
49 
50 private:
51  VISKORES_CONT viskores::cont::DataSet DoExecute(const viskores::cont::DataSet& input) override;
52 
53  viskores::Id NumberOfBins = 10;
54 };
55 } // namespace density_estimate
56 } // namespace filter
57 } // namespace viskores
58 
59 #endif // viskores_filter_density_estimate_Entropy_h
viskores::filter::density_estimate::Entropy
Construct the entropy histogram of a given Field.
Definition: Entropy.h:35
viskores::cont::DataSet
Contains and manages the geometric data structures that Viskores operates on.
Definition: DataSet.h:66
viskores::filter::density_estimate::Entropy::GetNumberOfBins
viskores::Id GetNumberOfBins() const
Definition: Entropy.h:48
viskores::filter::Filter
Base class for all filters.
Definition: Filter.h:171
viskores_filter_density_estimate_export.h
viskores::List
A template used to hold a list of types.
Definition: List.h:47
viskores::Id
viskores::Int64 Id
Base type to use to index arrays.
Definition: Types.h:235
VISKORES_CONT
#define VISKORES_CONT
Definition: ExportMacros.h:65
viskores
Groups connected points that have the same field value.
Definition: Atomic.h:27
viskores::TypeListScalarAll
viskores::List< viskores::Int8, viskores::UInt8, viskores::Int16, viskores::UInt16, viskores::Int32, viskores::UInt32, viskores::Int64, viskores::UInt64, viskores::Float32, viskores::Float64 > TypeListScalarAll
A list of all scalars defined in viskores/Types.h.
Definition: TypeList.h:113
viskores::filter::density_estimate::Entropy::SetNumberOfBins
void SetNumberOfBins(viskores::Id count)
Definition: Entropy.h:46
Filter.h