PointSetMinTree

class PointSetMinTree : public PointSetSegmentTree<int, PointSetMinTree>

Public Types

using NodeType = int

Public Functions

inline void updateFromChildren(NodeType &parent, NodeType &leftChild, NodeType &rightChild)
inline int rightMostLessThan(size_t position, int value)

Find right most position with value than less than given in range [0; position].

Parameters
  • position – inclusive right side of query range

  • value – search for position less than this

Returns

returns the position with searched property or -1 if there is no such position.

inline int leftMostLessThan(size_t position, int value)

Find left most position with value less than value in range [position; size).

Parameters
  • position – inclusive left side of query range

  • value – search for position less than this

Returns

returns the position with searched property or -1 if there is no such position.