Mantid
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
Mantid::API::MWDimension Class Reference
Inheritance diagram for Mantid::API::MWDimension:
Mantid::Geometry::IMDDimension

Public Member Functions

coord_t getBinWidth () const override
 Return the bin width taking into account if the stored values are actually bin centres or not. More...
 
const std::string & getDimensionId () const override
 short name which identify the dimension among other dimension. More...
 
bool getIsIntegrated () const override
 if the dimension is integrated (e.g. have single bin) More...
 
coord_t getMaximum () const override
 
const Geometry::MDFramegetMDFrame () const override
 
const Kernel::MDUnitgetMDUnits () const override
 
coord_t getMinimum () const override
 
std::string getName () const override
 the name of the dimennlsion as can be displayed along the axis More...
 
size_t getNBins () const override
 number of bins dimension have (an integrated has one). More...
 
size_t getNBoundaries () const override
 number of bin boundaries (axis points) More...
 
const Kernel::UnitLabel getUnits () const override
 
coord_t getX (size_t ind) const override
 Get coordinate for index;. More...
 
 MWDimension (const Axis *axis, std::string dimensionId)
 
void setRange (size_t, coord_t, coord_t) override
 Change the extents and number of bins. More...
 
std::string toXMLString () const override
 
- Public Member Functions inherited from Mantid::Geometry::IMDDimension
virtual coord_t getBinWidth () const
 
virtual const std::string & getDimensionId () const =0
 short name which identify the dimension among other dimension. More...
 
virtual bool getIsIntegrated () const
 
virtual coord_t getMaximum () const =0
 
virtual const Geometry::MDFramegetMDFrame () const =0
 
virtual const Kernel::MDUnitgetMDUnits () const =0
 
virtual coord_t getMinimum () const =0
 
virtual std::string getName () const =0
 
virtual size_t getNBins () const =0
 
virtual size_t getNBoundaries () const =0
 
virtual const Kernel::UnitLabel getUnits () const =0
 
virtual coord_t getX (size_t ind) const =0
 
bool operator!= (const IMDDimension &) const
 
bool operator== (const IMDDimension &) const
 
virtual void setRange (size_t nBins, coord_t min, coord_t max)=0
 Change the extents and number of bins. More...
 
virtual std::string toXMLString () const =0
 
virtual ~IMDDimension ()=default
 Destructor. More...
 

Private Attributes

const Axism_axis
 
const std::string m_dimensionId
 
const Geometry::MDFrame_const_uptr m_frame
 
const bool m_haveEdges
 

Detailed Description

Definition at line 1437 of file MatrixWorkspace.cpp.

Constructor & Destructor Documentation

◆ MWDimension()

Mantid::API::MWDimension::MWDimension ( const Axis axis,
std::string  dimensionId 
)
inline

Definition at line 1439 of file MatrixWorkspace.cpp.

Member Function Documentation

◆ getBinWidth()

coord_t Mantid::API::MWDimension::getBinWidth ( ) const
inlineoverridevirtual

Return the bin width taking into account if the stored values are actually bin centres or not.

Returns
A single value for the uniform bin width

Reimplemented from Mantid::Geometry::IMDDimension.

Definition at line 1495 of file MatrixWorkspace.cpp.

References getMaximum(), getMinimum(), getNBins(), and m_haveEdges.

◆ getDimensionId()

const std::string & Mantid::API::MWDimension::getDimensionId ( ) const
inlineoverridevirtual

short name which identify the dimension among other dimension.

A dimension can be usually find by its ID and various various method exist to manipulate set of dimensions by their names.

Implements Mantid::Geometry::IMDDimension.

Definition at line 1459 of file MatrixWorkspace.cpp.

References m_dimensionId.

◆ getIsIntegrated()

bool Mantid::API::MWDimension::getIsIntegrated ( ) const
inlineoverridevirtual

if the dimension is integrated (e.g. have single bin)

Reimplemented from Mantid::Geometry::IMDDimension.

Definition at line 1462 of file MatrixWorkspace.cpp.

References Mantid::API::Axis::length(), and m_axis.

◆ getMaximum()

coord_t Mantid::API::MWDimension::getMaximum ( ) const
inlineoverridevirtual
Returns
the maximum extent of this dimension

Implements Mantid::Geometry::IMDDimension.

Definition at line 1468 of file MatrixWorkspace.cpp.

References Mantid::API::Axis::getMax(), and m_axis.

Referenced by getBinWidth().

◆ getMDFrame()

const Geometry::MDFrame & Mantid::API::MWDimension::getMDFrame ( ) const
inlineoverridevirtual
Returns
the MDFrame

Implements Mantid::Geometry::IMDDimension.

Definition at line 1504 of file MatrixWorkspace.cpp.

References m_frame.

◆ getMDUnits()

const Kernel::MDUnit & Mantid::API::MWDimension::getMDUnits ( ) const
inlineoverridevirtual
Returns
the mdunits of the dimension

Implements Mantid::Geometry::IMDDimension.

Definition at line 1503 of file MatrixWorkspace.cpp.

References m_frame.

◆ getMinimum()

coord_t Mantid::API::MWDimension::getMinimum ( ) const
inlineoverridevirtual
Returns
the minimum extent of this dimension

Implements Mantid::Geometry::IMDDimension.

Definition at line 1465 of file MatrixWorkspace.cpp.

References Mantid::API::Axis::getMin(), and m_axis.

Referenced by getBinWidth().

◆ getName()

std::string Mantid::API::MWDimension::getName ( ) const
inlineoverridevirtual

the name of the dimennlsion as can be displayed along the axis

Implements Mantid::Geometry::IMDDimension.

Definition at line 1445 of file MatrixWorkspace.cpp.

References m_axis, Mantid::API::Axis::title(), and Mantid::API::Axis::unit().

◆ getNBins()

size_t Mantid::API::MWDimension::getNBins ( ) const
inlineoverridevirtual

number of bins dimension have (an integrated has one).

A axis directed along dimension would have getNBins+1 axis points.

Implements Mantid::Geometry::IMDDimension.

Definition at line 1472 of file MatrixWorkspace.cpp.

References Mantid::API::Axis::length(), m_axis, and m_haveEdges.

Referenced by getBinWidth().

◆ getNBoundaries()

size_t Mantid::API::MWDimension::getNBoundaries ( ) const
inlineoverridevirtual

number of bin boundaries (axis points)

Implements Mantid::Geometry::IMDDimension.

Definition at line 1480 of file MatrixWorkspace.cpp.

References Mantid::API::Axis::length(), and m_axis.

◆ getUnits()

const Kernel::UnitLabel Mantid::API::MWDimension::getUnits ( ) const
inlineoverridevirtual
Returns
the units of the dimension as a string

Implements Mantid::Geometry::IMDDimension.

Definition at line 1454 of file MatrixWorkspace.cpp.

References m_axis, and Mantid::API::Axis::unit().

◆ getX()

coord_t Mantid::API::MWDimension::getX ( size_t  ind) const
inlineoverridevirtual

Get coordinate for index;.

Implements Mantid::Geometry::IMDDimension.

Definition at line 1488 of file MatrixWorkspace.cpp.

References m_axis.

◆ setRange()

void Mantid::API::MWDimension::setRange ( size_t  ,
coord_t  ,
coord_t   
)
inlineoverridevirtual

Change the extents and number of bins.

Implements Mantid::Geometry::IMDDimension.

Definition at line 1483 of file MatrixWorkspace.cpp.

◆ toXMLString()

std::string Mantid::API::MWDimension::toXMLString ( ) const
inlineoverridevirtual
Returns
an XML string representation of the dimension.

Implements Mantid::Geometry::IMDDimension.

Definition at line 1501 of file MatrixWorkspace.cpp.

Member Data Documentation

◆ m_axis

const Axis& Mantid::API::MWDimension::m_axis
private

◆ m_dimensionId

const std::string Mantid::API::MWDimension::m_dimensionId
private

Definition at line 1508 of file MatrixWorkspace.cpp.

Referenced by getDimensionId().

◆ m_frame

const Geometry::MDFrame_const_uptr Mantid::API::MWDimension::m_frame
private

Definition at line 1510 of file MatrixWorkspace.cpp.

Referenced by getMDFrame(), and getMDUnits().

◆ m_haveEdges

const bool Mantid::API::MWDimension::m_haveEdges
private

Definition at line 1509 of file MatrixWorkspace.cpp.

Referenced by getBinWidth(), and getNBins().


The documentation for this class was generated from the following file: