Commit 29fb7e40 authored by Haocheng LIU's avatar Haocheng LIU

Fix the documentation in NDEntropy and NDhistogram filters

parent c44d010f
......@@ -26,19 +26,9 @@ namespace vtkm
{
namespace filter
{
/// \brief Clean a mesh to an unstructured grid
/// \brief Calculate the entropy of input N-Dims fields
///
/// This filter takes a data set and essentially copies it into a new data set.
/// The newly constructed data set will have the same cells as the input and
/// the topology will be stored in a \c CellSetExplicit<>. The filter will also
/// optionally remove all unused points.
///
/// Note that the result of \c CleanGrid is not necessarily smaller than the
/// input. For example, "cleaning" a data set with a \c CellSetStructured
/// topology will actually result in a much larger data set.
///
/// \todo Add a feature to merge points that are coincident or within a
/// tolerance.
/// This filter calculate the entropy of input N-Dims fields.
///
class NDEntropy : public vtkm::filter::FilterDataSet<NDEntropy>
{
......
......@@ -26,19 +26,17 @@ namespace vtkm
{
namespace filter
{
/// \brief Clean a mesh to an unstructured grid
/// \brief Generate a N-Dims histogram from input fields
///
/// This filter takes a data set and essentially copies it into a new data set.
/// The newly constructed data set will have the same cells as the input and
/// the topology will be stored in a \c CellSetExplicit<>. The filter will also
/// optionally remove all unused points.
///
/// Note that the result of \c CleanGrid is not necessarily smaller than the
/// input. For example, "cleaning" a data set with a \c CellSetStructured
/// topology will actually result in a much larger data set.
///
/// \todo Add a feature to merge points that are coincident or within a
/// tolerance.
/// This filter takes a data set and with target fields and bins defined,
/// it would generate a N-Dims histogram from input fields. The result is stored
/// in a field named as "Frequency". This filed contains all the frequencies of
/// the N-Dims histogram in sparse representation. That being said, the result
/// field does not store 0 frequency bins. Meanwhile all input fileds now
/// would have the same length and store bin ids instead.
/// E.g. (FieldA[i], FieldB[i], FieldC[i], Frequency[i]) is a bin in the histogram.
/// The first three numbers are binIDs for FieldA, FieldB and FieldC. Frequency[i] stores
/// the frequency for this bin (FieldA[i], FieldB[i], FieldC[i]).
///
class NDHistogram : public vtkm::filter::FilterDataSet<NDHistogram>
{
......
......@@ -80,7 +80,7 @@ void RunTest()
//The first "fieldNames.size()"" fields are the binId arrays for inputs field
//And their order and field names are the same as the order and name in fieldNames
//The name of last fields in the dataset is "Frequency"
//This field contains the all freqncys of the N-Dims histogram
//This field contains all the frequencies of the N-Dims histogram
//The result histogram is stored in sparse representation
//(Do not store and return zero frequency bins)
//All fields in return dataset must have the same length
......
......@@ -106,7 +106,7 @@ void TestNDimsHistogram()
// (we do not keep the 0 frequency entities)
// e.g. we have three variable(data arrays) in this example
// binIds[0, 1, 2][j] is a combination of bin ID of three variable,
// freqs[j] is the freqncy of this bin IDs combination
// freqs[j] is the frequency of this bin IDs combination
std::vector<vtkm::cont::ArrayHandle<vtkm::Id>> binIds;
vtkm::cont::ArrayHandle<vtkm::Id> freqs;
ndHistogram.Run(binIds, freqs, VTKM_DEFAULT_DEVICE_ADAPTER_TAG());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment