WXP C++ Library Version 6.74.9
Loading...
Searching...
No Matches
WXP::FloatArray Class Reference

This class creates an integer array. More...

#include "../include/FloatArray.h"

Public Member Functions

int init ()
int init (int size)
 FloatArray ()
 FloatArray (int size)
 FloatArray (const char *str)
 ~FloatArray ()
 FloatArray (const FloatArray &data)
FloatArray operator= (const FloatArray &data)
int copy (const FloatArray &data)
int clear ()
int expand (int size)
int setNum (int n)
int add (float rval)
int add1 (float rval)
int set (const char *str)
int set (int ind, float rval)
int get (int ind, float &rval)
float get (int ind)
int getNum ()
int offset (int ind, float rval)
int print ()

Friends

class Grid
class NetCdfFile

Detailed Description

This class creates an integer array.

Author
Dan Vietor

Constructor & Destructor Documentation

◆ FloatArray() [1/4]

FloatArray::FloatArray ( )

Constructor. Initializes the values.

References init().

Referenced by copy(), FloatArray(), and operator=().

◆ FloatArray() [2/4]

FloatArray::FloatArray ( int size)

Constructor. Size the arrays.

References init().

◆ FloatArray() [3/4]

FloatArray::FloatArray ( const char * str)

Constructor. Build from string

References init(), and set().

◆ ~FloatArray()

FloatArray::~FloatArray ( )

Destructor.

◆ FloatArray() [4/4]

FloatArray::FloatArray ( const FloatArray & data)

Copy constructor.

Parameters
dataStrings class to copy from

References copy(), and FloatArray().

Member Function Documentation

◆ add()

int FloatArray::add ( float rval)

Adds a new point.

Parameters
rvalValue to add

Referenced by WXP::ImagePlot::draw(), WXP::RadPlot::draw(), and set().

◆ add1()

int WXP::FloatArray::add1 ( float rval)
inline

Adds a value (no bounds check)

◆ clear()

int WXP::FloatArray::clear ( )
inline

Clear the array

◆ copy()

int FloatArray::copy ( const FloatArray & data)

Copy data.

Parameters
eptsStrings class to copy from

References FloatArray(), and init().

Referenced by FloatArray(), and operator=().

◆ get() [1/2]

float FloatArray::get ( int ind)

Gets a specific point value from array.

Parameters
indIndex of value to get
Returns
Output value

References WXP::Const::MISS.

◆ get() [2/2]

int FloatArray::get ( int ind,
float & rval )

Gets a specific point value from array.

Parameters
indIndex of value to get
Return values
rvalOutput value

Referenced by WXP::NidsImage::setThres().

◆ getNum()

int WXP::FloatArray::getNum ( )
inline

Return the number of points

Referenced by WXP::NidsImage::setThres().

◆ init() [1/2]

int FloatArray::init ( )

Initializes the values

Referenced by copy(), FloatArray(), FloatArray(), and FloatArray().

◆ init() [2/2]

int FloatArray::init ( int size)

Initializes the values

◆ offset()

int FloatArray::offset ( int ind,
float rval )

Offsets a specific point value in array.

Parameters
indIndex of value to set
rvalOffset value

◆ operator=()

FloatArray FloatArray::operator= ( const FloatArray & data)

Assignment operator. Used to overload copying

Parameters
dataString class to copy from

References copy(), and FloatArray().

◆ print()

int FloatArray::print ( )

Prints the values to standard output.

◆ set() [1/2]

int FloatArray::set ( const char * str)

Sets the array values from a string

Parameters
strString of values, can be min-max/increment

References add(), WXP::Strings::getFloat(), WXP::Strings::getNum(), and WXP::Strings::getString().

Referenced by FloatArray(), and WXP::NidsImage::setThres().

◆ set() [2/2]

int FloatArray::set ( int ind,
float rval )

Sets a specific value in array.

Parameters
indIndex of value to set
rvalNew value

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