Google OR-Tools v9.15
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::FixedShapeBinaryTree Class Reference

Detailed Description

Definition at line 51 of file fixed_shape_binary_tree.h.

#include <fixed_shape_binary_tree.h>

Public Member Functions

 FixedShapeBinaryTree (LeafIndex num_leaves)
int StorageSize () const
TreeNodeIndex HighestIntermediateNodeIndex () const
TreeNodeIndex HighestNodeIndex () const
bool IsLeaf (TreeNodeIndex node) const
TreeNodeIndex Root () const
TreeNodeIndex FirstLeafNode () const
TreeNodeIndex LastLeafNode () const
TreeNodeIndex LeftChild (TreeNodeIndex node) const
TreeNodeIndex RightChild (TreeNodeIndex node) const
TreeNodeIndex Parent (TreeNodeIndex node) const
TreeNodeIndex Sibling (TreeNodeIndex node) const
LeafIndex LeafValue (TreeNodeIndex node) const
int Depth (TreeNodeIndex node) const
std::pair< LeafIndex, LeafIndex > GetInterval (TreeNodeIndex node) const
TreeNodeIndex GetNodeStartOfRange (LeafIndex first_leaf, LeafIndex last_leaf) const
TreeNodeIndex GetNodeEndOfRange (LeafIndex first_leaf, LeafIndex last_leaf) const
template<typename TypeWithPushBack>
void PartitionIntervalIntoNodes (LeafIndex first_leaf, LeafIndex last_leaf, TypeWithPushBack *result) const
TreeNodeIndex GetLeaf (LeafIndex value) const

Constructor & Destructor Documentation

◆ FixedShapeBinaryTree()

operations_research::FixedShapeBinaryTree::FixedShapeBinaryTree ( LeafIndex num_leaves)
inlineexplicit

Definition at line 53 of file fixed_shape_binary_tree.h.

Member Function Documentation

◆ Depth()

int operations_research::FixedShapeBinaryTree::Depth ( TreeNodeIndex node) const
inline

Definition at line 110 of file fixed_shape_binary_tree.h.

◆ FirstLeafNode()

TreeNodeIndex operations_research::FixedShapeBinaryTree::FirstLeafNode ( ) const
inline

Definition at line 73 of file fixed_shape_binary_tree.h.

◆ GetInterval()

std::pair< LeafIndex, LeafIndex > operations_research::FixedShapeBinaryTree::GetInterval ( TreeNodeIndex node) const
inline

Definition at line 116 of file fixed_shape_binary_tree.h.

◆ GetLeaf()

TreeNodeIndex operations_research::FixedShapeBinaryTree::GetLeaf ( LeafIndex value) const
inline

Definition at line 266 of file fixed_shape_binary_tree.h.

◆ GetNodeEndOfRange()

TreeNodeIndex operations_research::FixedShapeBinaryTree::GetNodeEndOfRange ( LeafIndex first_leaf,
LeafIndex last_leaf ) const
inline

Definition at line 186 of file fixed_shape_binary_tree.h.

◆ GetNodeStartOfRange()

TreeNodeIndex operations_research::FixedShapeBinaryTree::GetNodeStartOfRange ( LeafIndex first_leaf,
LeafIndex last_leaf ) const
inline

Definition at line 142 of file fixed_shape_binary_tree.h.

◆ HighestIntermediateNodeIndex()

TreeNodeIndex operations_research::FixedShapeBinaryTree::HighestIntermediateNodeIndex ( ) const
inline

Definition at line 63 of file fixed_shape_binary_tree.h.

◆ HighestNodeIndex()

TreeNodeIndex operations_research::FixedShapeBinaryTree::HighestNodeIndex ( ) const
inline

Definition at line 67 of file fixed_shape_binary_tree.h.

◆ IsLeaf()

bool operations_research::FixedShapeBinaryTree::IsLeaf ( TreeNodeIndex node) const
inline

Definition at line 69 of file fixed_shape_binary_tree.h.

◆ LastLeafNode()

TreeNodeIndex operations_research::FixedShapeBinaryTree::LastLeafNode ( ) const
inline

Definition at line 77 of file fixed_shape_binary_tree.h.

◆ LeafValue()

LeafIndex operations_research::FixedShapeBinaryTree::LeafValue ( TreeNodeIndex node) const
inline

Definition at line 101 of file fixed_shape_binary_tree.h.

◆ LeftChild()

TreeNodeIndex operations_research::FixedShapeBinaryTree::LeftChild ( TreeNodeIndex node) const
inline

Definition at line 81 of file fixed_shape_binary_tree.h.

◆ Parent()

TreeNodeIndex operations_research::FixedShapeBinaryTree::Parent ( TreeNodeIndex node) const
inline

Definition at line 91 of file fixed_shape_binary_tree.h.

◆ PartitionIntervalIntoNodes()

template<typename TypeWithPushBack>
void operations_research::FixedShapeBinaryTree::PartitionIntervalIntoNodes ( LeafIndex first_leaf,
LeafIndex last_leaf,
TypeWithPushBack * result ) const
inline

Definition at line 219 of file fixed_shape_binary_tree.h.

◆ RightChild()

TreeNodeIndex operations_research::FixedShapeBinaryTree::RightChild ( TreeNodeIndex node) const
inline

Definition at line 86 of file fixed_shape_binary_tree.h.

◆ Root()

TreeNodeIndex operations_research::FixedShapeBinaryTree::Root ( ) const
inline

Definition at line 71 of file fixed_shape_binary_tree.h.

◆ Sibling()

TreeNodeIndex operations_research::FixedShapeBinaryTree::Sibling ( TreeNodeIndex node) const
inline

Definition at line 96 of file fixed_shape_binary_tree.h.

◆ StorageSize()

int operations_research::FixedShapeBinaryTree::StorageSize ( ) const
inline

Definition at line 60 of file fixed_shape_binary_tree.h.


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