Mantid
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
Mantid::API::MWXDimension Class Reference

An implementation of IMDDimension for MatrixWorkspace that points to the X vector of the first spectrum. More...

Inheritance diagram for Mantid::API::MWXDimension:
Mantid::Geometry::IMDDimension

Public Member Functions

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
 coord_t the minimum extent of this dimension More...
 
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 axis points (bin boundaries) More...
 
const Kernel::UnitLabel getUnits () const override
 
coord_t getX (size_t ind) const override
 Get coordinate for index;. More...
 
 MWXDimension (const MatrixWorkspace *ws, 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 std::string m_dimensionId
 Dimension ID string. More...
 
const Geometry::MDFrame_const_uptr m_frame
 Unit. More...
 
const MatrixWorkspacem_ws
 Workspace we refer to. More...
 
MantidVec m_X
 Cached X vector. More...
 

Detailed Description

An implementation of IMDDimension for MatrixWorkspace that points to the X vector of the first spectrum.

Definition at line 1517 of file MatrixWorkspace.cpp.

Constructor & Destructor Documentation

◆ MWXDimension()

Mantid::API::MWXDimension::MWXDimension ( const MatrixWorkspace ws,
std::string  dimensionId 
)
inline

Definition at line 1519 of file MatrixWorkspace.cpp.

Member Function Documentation

◆ getDimensionId()

const std::string & Mantid::API::MWXDimension::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 1540 of file MatrixWorkspace.cpp.

References m_dimensionId.

◆ getIsIntegrated()

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

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

Reimplemented from Mantid::Geometry::IMDDimension.

Definition at line 1543 of file MatrixWorkspace.cpp.

References m_X.

◆ getMaximum()

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

Implements Mantid::Geometry::IMDDimension.

Definition at line 1549 of file MatrixWorkspace.cpp.

References m_X.

◆ getMDFrame()

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

Implements Mantid::Geometry::IMDDimension.

Definition at line 1569 of file MatrixWorkspace.cpp.

References m_frame.

◆ getMDUnits()

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

Implements Mantid::Geometry::IMDDimension.

Definition at line 1568 of file MatrixWorkspace.cpp.

References m_frame.

◆ getMinimum()

coord_t Mantid::API::MWXDimension::getMinimum ( ) const
inlineoverridevirtual

coord_t the minimum extent of this dimension

Implements Mantid::Geometry::IMDDimension.

Definition at line 1546 of file MatrixWorkspace.cpp.

References m_X.

◆ getName()

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

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

Implements Mantid::Geometry::IMDDimension.

Definition at line 1525 of file MatrixWorkspace.cpp.

References Mantid::API::MatrixWorkspace::getAxis(), m_ws, and Mantid::API::Axis::unit().

◆ getNBins()

size_t Mantid::API::MWXDimension::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 1553 of file MatrixWorkspace.cpp.

References Mantid::API::MatrixWorkspace::isHistogramData(), m_ws, and m_X.

◆ getNBoundaries()

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

number of axis points (bin boundaries)

Implements Mantid::Geometry::IMDDimension.

Definition at line 1556 of file MatrixWorkspace.cpp.

References m_X.

◆ getUnits()

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

Implements Mantid::Geometry::IMDDimension.

Definition at line 1535 of file MatrixWorkspace.cpp.

References Mantid::API::MatrixWorkspace::getAxis(), m_ws, and Mantid::API::Axis::unit().

◆ getX()

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

Get coordinate for index;.

Implements Mantid::Geometry::IMDDimension.

Definition at line 1564 of file MatrixWorkspace.cpp.

References m_X.

◆ setRange()

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

Change the extents and number of bins.

Implements Mantid::Geometry::IMDDimension.

Definition at line 1559 of file MatrixWorkspace.cpp.

◆ toXMLString()

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

Implements Mantid::Geometry::IMDDimension.

Definition at line 1567 of file MatrixWorkspace.cpp.

Member Data Documentation

◆ m_dimensionId

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

Dimension ID string.

Definition at line 1577 of file MatrixWorkspace.cpp.

Referenced by getDimensionId().

◆ m_frame

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

Unit.

Definition at line 1579 of file MatrixWorkspace.cpp.

Referenced by getMDFrame(), and getMDUnits().

◆ m_ws

const MatrixWorkspace* Mantid::API::MWXDimension::m_ws
private

Workspace we refer to.

Definition at line 1573 of file MatrixWorkspace.cpp.

Referenced by getName(), getNBins(), and getUnits().

◆ m_X

MantidVec Mantid::API::MWXDimension::m_X
private

Cached X vector.

Definition at line 1575 of file MatrixWorkspace.cpp.

Referenced by getIsIntegrated(), getMaximum(), getMinimum(), getNBins(), getNBoundaries(), and getX().


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