PIPS-IPM++ Solver and Tools
a parallel interior-point method for doubly bordered block diagonal linear programs
DistributedInputTree Class Reference

Represents a node in the distributed input tree, holding problem data or callback functions to retrieve that data. More...

#include <DistributedInputTree.h>

Classes

class  DistributedInputNode

Public Member Functions

 DistributedInputTree (std::unique_ptr< DistributedInputNode > root)
 Constructs a DistributedInputTree with a given root node.
 ~DistributedInputTree ()=default
 Default destructor.
void add_child (std::unique_ptr< DistributedInputNode > node)
 Adds a new child node to the current tree node. The child is wrapped in a new DistributedInputTree instance.
void add_child (std::unique_ptr< DistributedInputTree > subTree)
 Adds a pre-constructed subtree as a child to the current tree node.

Protected Attributes

std::unique_ptr< DistributedInputNodenodeInput {}
 A unique pointer to the DistributedInputNode that this tree node represents. This holds the actual problem data or callback functions for this specific node.
std::vector< std::unique_ptr< DistributedInputTree > > children
 A vector of unique pointers to child DistributedInputTree instances. This represents the branches of the problem tree (e.g., blocks in the bordered block-diagonal structure).

Friends

class DistributedTreeCallbacks

Detailed Description

Represents a node in the distributed input tree, holding problem data or callback functions to retrieve that data.

This class is used internally by DistributedInputTree to represent a single node (e.g., a block) in the problem structure. It stores either concrete problem dimensions or, more commonly, function pointers (callbacks) that the solver can invoke to obtain problem data on demand.

See also
DistributedInputTree
DistributedTreeCallbacks

Constructor & Destructor Documentation

◆ DistributedInputTree()

DistributedInputTree::DistributedInputTree ( std::unique_ptr< DistributedInputNode > root)
explicit

Constructs a DistributedInputTree with a given root node.

Parameters
rootA unique pointer to the root node of the problem tree.

Member Function Documentation

◆ add_child() [1/2]

void DistributedInputTree::add_child ( std::unique_ptr< DistributedInputNode > node)

Adds a new child node to the current tree node. The child is wrapped in a new DistributedInputTree instance.

Parameters
nodeA unique pointer to the DistributedInputNode to be added as a child.

◆ add_child() [2/2]

void DistributedInputTree::add_child ( std::unique_ptr< DistributedInputTree > subTree)

Adds a pre-constructed subtree as a child to the current tree node.

Parameters
subTreeA unique pointer to the DistributedInputTree instance to be added as a child.