My Project
OSNode.cpp
Go to the documentation of this file.
1/* $Id: OSNode.cpp 3186 2010-02-06 23:38:35Z kmartin $ */
13#include "OSNode.h"
14#include <iostream>
15
16
17
19
20 rowIdxNumNonz = 0;
21 nodeID = -99999;
22
23 }//end default constructor
24
25
26 OSNode::OSNode(int rowIdxNumNonz_, int thetaNumNonz_){
27
28 rowIdxNumNonz = rowIdxNumNonz_;
29 rowIdx = new int[ rowIdxNumNonz] ;
30 rowUB = new double[ rowIdxNumNonz] ;
31 rowLB = new double[ rowIdxNumNonz] ;
32
33 thetaNumNonz = thetaNumNonz_;
34 thetaIdx = new int[ thetaNumNonz] ;
35 theta = new double[ thetaNumNonz] ;
36
37 nodeID = -99999;
38
39
40
41
42 }//end constructor for allocating arrays
43
44
45
47
48 //garbage collection
49
50 delete[] rowIdx;
51 rowIdx = NULL;
52
53 delete[] rowUB;
54 rowUB = NULL;
55
56 delete[] rowLB;
57 rowLB = NULL;
58
59 delete[] thetaIdx;
60 thetaIdx = NULL;
61
62 delete[] theta;
63 theta = NULL;
64
65
66 std::cout << "I AM DELETING A NODE IN OSNODE DESTRUCTOR" << std::endl;
67 }//end default destructor
68
69
double * rowUB
rowUB is a vector of row upper bounds
Definition OSNode.h:50
int * thetaIdx
theta is an array of primal solution variable indexes
Definition OSNode.h:65
int rowIdxNumNonz
rowIdxNumNonz is the number of non-zero elements in rowIndex
Definition OSNode.h:42
int thetaNumNonz
thetaNumNonz is the number of non-zero elements in the theta variable solution at this node
Definition OSNode.h:60
int nodeID
nodeID is the node ID
Definition OSNode.h:39
~OSNode()
Default destructor.
Definition OSNode.cpp:46
int * rowIdx
rowIdx is a vector of row indexes for which we are setting the upper and lower bounds
Definition OSNode.h:47
double * theta
theta is an array of primal positive values this is used for branching and creating new children node...
Definition OSNode.h:71
double * rowLB
rowLB is a vector of row lower bounds
Definition OSNode.h:53
OSNode()
Default Constructor.
Definition OSNode.cpp:18