struct MAGES::Recorder::IntervalTree::RVP

Overview

struct RVP: public IComparable< RVP >
{
    // properties

    TKey Min;
    TKey Max;
    TValue Value;

    // methods

    RVP(TKey min, TKey max, TValue value);
    int CompareTo(RVP other);
    int Side(TKey comparand);
    int Side(TKey comparandMin, TKey comparandMax);
};

Detailed Documentation

Properties

TKey Min

Gets the minimum key.

TKey Max

Gets the maximum key.

TValue Value

Gets the value.

Methods

RVP(TKey min, TKey max, TValue value)

Initializes a new instance of the RVP struct.

Parameters:

min

The minimum key.

max

The maximum key.

value

The value.

int Side(TKey comparand)

Determines if the given key is within the range of this RVP.

Parameters:

comparand

The key.

Returns:

0 if inside, -1 if less than range, 1 if greater than range.

int Side(TKey comparandMin, TKey comparandMax)

Determines if the given range is within the range of this RVP.

Parameters:

comparandMin

The minimum comparand.

comparandMax

The maximum comparand.

Returns:

-2: Range is on the left side of this RVP. -1: Range overlaps coming from the left. 0: Range is inside this RVP, or is RVP. +1: Range overlaps coming from the right. +2: Range is on the right side of this RVP.