Rogue Wave Views
Charts Package API Reference Guide
Product Documentation:

Rogue Wave Views
Documentation Home
List of all members | Public Member Functions
IlvCoordInterval Class Reference

Class representing a coordinate interval. More...

#include <ilviews/charts/common.h>

Public Member Functions

ILVEXPLICIT IlvCoordInterval (IlDouble min=0.0, IlDouble max=0.0)
 Constructor. More...
 
IlDouble getLength () const
 Returns the difference between the maximum and the minimum values. More...
 
IlDouble getMax () const
 Returns the maximum value. More...
 
IlDouble getMin () const
 Returns the minimum value. More...
 
IlvCoordIntervalintersection (const IlvCoordInterval &itv)
 Sets the current interval to the intersection between the current interval and another one. More...
 
IlBoolean intersects (const IlvCoordInterval &itv) const
 Indicates whether an interval intersects the considered interval. More...
 
IlBoolean isAfter (IlDouble val) const
 Indicates whether a value is after or on the considered interval. More...
 
IlBoolean isBefore (IlDouble val) const
 Indicates whether a value is before or on the considered interval. More...
 
IlBoolean isInside (IlDouble val) const
 Indicates whether a value is on or within the considered interval. More...
 
IlBoolean isOutside (IlDouble val) const
 Indicates whether a value is on or outside the considered interval. More...
 
IlBoolean isStrictlyAfter (IlDouble val) const
 Indicates whether a value is after the considered interval. More...
 
IlBoolean isStrictlyBefore (IlDouble val) const
 Indicates whether a value is before the considered interval. More...
 
IlBoolean isStrictlyInside (IlDouble val) const
 Indicates whether a value is inside the considered interval. More...
 
IlBoolean isStrictlyOutside (IlDouble val) const
 Indicates whether a value is outside the interval. More...
 
void operator+= (IlDouble val)
 Extends the considered interval so that it contains a given value. More...
 
void operator+= (const IlvCoordInterval &itv)
 Extends the considered interval so that it contains a given interval. More...
 
void set (IlDouble min, IlDouble max)
 Sets the minimum and the maximum values. More...
 
void setMax (IlDouble val)
 Sets the maximum value. More...
 
void setMin (IlDouble val)
 Sets the minimum value. More...
 
IlDouble stepToValue (IlDouble nSteps, IlDouble iStep) const
 Returns a value within the considered values interval. More...
 
void translate (IlDouble delta)
 Translates the considered interval. More...
 

Detailed Description

Class representing a coordinate interval.

Library: ilvcharts

This class is used to represent a values interval that is characterized by its minimum and maximum values.

Constructor & Destructor Documentation

§ IlvCoordInterval()

ILVEXPLICIT IlvCoordInterval::IlvCoordInterval ( IlDouble  min = 0.0,
IlDouble  max = 0.0 
)

Constructor.

Initializes a new IlvCoordInterval object.

Parameters
minThe value set as the minimum of the considered interval.
maxThe value set as the maximum of the considered interval.

Member Function Documentation

§ getLength()

IlDouble IlvCoordInterval::getLength ( ) const

Returns the difference between the maximum and the minimum values.

Returns
The difference between the maximum and the minimum values of the interval.

§ getMax()

IlDouble IlvCoordInterval::getMax ( ) const

Returns the maximum value.

Returns
The maximum value of the considered values interval.

§ getMin()

IlDouble IlvCoordInterval::getMin ( ) const

Returns the minimum value.

Returns
The minimum value of the considered values interval.

§ intersection()

IlvCoordInterval& IlvCoordInterval::intersection ( const IlvCoordInterval itv)

Sets the current interval to the intersection between the current interval and another one.

Computes the intersection between the considered interval and the interval itv. The considered interval is then modified to contain this intersection. If there is no intersection, the considered interval is modified so that the maximum value is equal to the minimum value, thus indicating that the intersection is null since the modified interval contains no value between its minimum and its maximum.

Parameters
itvThe interval with which we want to compute the intersection.
Returns
The current interval that has been modified to contain the intersection with the interval itv.

§ intersects()

IlBoolean IlvCoordInterval::intersects ( const IlvCoordInterval itv) const

Indicates whether an interval intersects the considered interval.

Parameters
itvThe interval for which we want to know if there is intersection with the considered interval.
Returns
IlTrue if some values of the interval itv are within the minimum and maximum values of the considered interval and IlFalse otherwise.

§ isAfter()

IlBoolean IlvCoordInterval::isAfter ( IlDouble  val) const

Indicates whether a value is after or on the considered interval.

Parameters
valThe value for which we want to know whether it is after or on the considered interval.
Returns
IlTrue if the value val is after or on the maximum value of the considered interval and IlFalse otherwise.

§ isBefore()

IlBoolean IlvCoordInterval::isBefore ( IlDouble  val) const

Indicates whether a value is before or on the considered interval.

Parameters
valThe value for which we want to know whether it is before or on the considered interval.
Returns
IlTrue if the value val is before or on the minimum value of the considered interval and IlFalse otherwise.

§ isInside()

IlBoolean IlvCoordInterval::isInside ( IlDouble  val) const

Indicates whether a value is on or within the considered interval.

Parameters
valThe value for which we want to know whether it is on or between the considered interval.
Returns
IlTrue if the value val is on or between the minimum and the maximum of the considered interval and IlFalse otherwise.

§ isOutside()

IlBoolean IlvCoordInterval::isOutside ( IlDouble  val) const

Indicates whether a value is on or outside the considered interval.

Parameters
valThe value for which we want to know if it is on or outside the considered interval.
Returns
IlTrue if the value val is on or outside the minimum and the maximum of the considered interval and IlFalse otherwise.

§ isStrictlyAfter()

IlBoolean IlvCoordInterval::isStrictlyAfter ( IlDouble  val) const

Indicates whether a value is after the considered interval.

Parameters
valThe value for which we want to know whether it is after the considered interval.
Returns
IlTrue if the value val is after the maximum of the considered interval and IlFalse otherwise.

§ isStrictlyBefore()

IlBoolean IlvCoordInterval::isStrictlyBefore ( IlDouble  val) const

Indicates whether a value is before the considered interval.

Parameters
valThe value for which we want to know if it is before the considered interval.
Returns
IlTrue if the value val is before the minimum of the considered interval and IlFalse otherwise.

§ isStrictlyInside()

IlBoolean IlvCoordInterval::isStrictlyInside ( IlDouble  val) const

Indicates whether a value is inside the considered interval.

Parameters
valThe value for which we want to know if it is inside the interval.
Returns
IlTrue if the value val is between the minimum and the maximum of the considered interval and IlFalse otherwise.

§ isStrictlyOutside()

IlBoolean IlvCoordInterval::isStrictlyOutside ( IlDouble  val) const

Indicates whether a value is outside the interval.

Parameters
valThe value for which we want to know if it is outside the considered interval.
Returns
IlTrue if the value val is outside of the minimum and the maximum of the considered interval and IlFalse otherwise.

§ operator+=() [1/2]

void IlvCoordInterval::operator+= ( IlDouble  val)

Extends the considered interval so that it contains a given value.

If the value val does not belong to the considered interval, this method extends the considered interval so that it contains this value.

Parameters
valThe value to be added to the current interval.

§ operator+=() [2/2]

void IlvCoordInterval::operator+= ( const IlvCoordInterval itv)

Extends the considered interval so that it contains a given interval.

If the interval itv is not inside the interval, this method extends the interval so that it contains this interval.

Parameters
itvThe interval to be added to the current interval.

§ set()

void IlvCoordInterval::set ( IlDouble  min,
IlDouble  max 
)

Sets the minimum and the maximum values.

Sets the minimum and the maximum values of the considered interval to min and max respectively.

Parameters
minThe new minimum value of the considered interval.
maxThe new maximum value of the considered interval.

§ setMax()

void IlvCoordInterval::setMax ( IlDouble  val)

Sets the maximum value.

Parameters
valThe new maximum value of the considered interval.

§ setMin()

void IlvCoordInterval::setMin ( IlDouble  val)

Sets the minimum value.

Parameters
valThe new minimum value of the considered interval.

§ stepToValue()

IlDouble IlvCoordInterval::stepToValue ( IlDouble  nSteps,
IlDouble  iStep 
) const

Returns a value within the considered values interval.

Given the number of values between the minimum and the maximum of the considered interval, this method returns the value at the index iStep inside the interval. The returned value is computed as follows:

value = length()/(nSteps-1)*iStep + getMin();
Parameters
nStepsThe number of values between the minimum and the maximum of the considered interval.
iStepThe index of the returned value of the interval.
Returns
The value of index iStep inside the considered interval.

§ translate()

void IlvCoordInterval::translate ( IlDouble  delta)

Translates the considered interval.

Translates the considered interval by delta.

Parameters
deltaThe value by which the interval is translated.

© Copyright 2018, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.