MCPcopy Create free account
hub / github.com/Kitware/VTK / GetMaxNorm

Method GetMaxNorm

Common/Core/vtkDataArray.cxx:754–768  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

752
753//------------------------------------------------------------------------------
754double vtkDataArray::GetMaxNorm()
755{
756 vtkIdType i;
757 double norm, maxNorm;
758 int nComponents = this->GetNumberOfComponents();
759
760 maxNorm = 0.0;
761 for (i = 0; i < this->GetNumberOfTuples(); i++)
762 {
763 norm = vtkMath::Norm(this->GetTuple(i), nComponents);
764 maxNorm = std::max(norm, maxNorm);
765 }
766
767 return maxNorm;
768}
769
770//------------------------------------------------------------------------------
771int vtkDataArray::CopyInformation(vtkInformation* infoFrom, vtkTypeBool deep)

Callers 5

Plot3DVectors.pyFile · 0.45
LayoutMethod · 0.45
RequestDataMethod · 0.45

Calls 5

NormFunction · 0.70
maxFunction · 0.50
GetNumberOfComponentsMethod · 0.45
GetNumberOfTuplesMethod · 0.45
GetTupleMethod · 0.45

Tested by 1