#include <btreeslackeval.h>
Collaboration diagram for BTreeSlackEval:
Public Member Functions | |
BTreeSlackEval (const BTree &newBTree) | |
void | evaluateSlacks (const BTree &newBTree) |
const vector< double > & | evaluateXSlacks (const BTree &orig_btree) |
const vector< double > & | evaluateYSlacks (const BTree &orig_btree) |
const vector< double > & | xSlack () const |
const vector< double > & | ySlack () const |
const vector< double > & | xlocRight () const |
const vector< double > & | ylocTop () const |
const BTreeCompactor & | btree () const |
const vector< BTree::BTreeNode > & | rev_tree () const |
const vector< BTree::BTreeNode > & | rev_orth_tree () const |
Static Public Member Functions | |
void | reverse_tree (const vector< BTree::BTreeNode > &tree, vector< BTree::BTreeNode > &rev_tree) |
Private Member Functions | |
BTreeSlackEval (const BTreeSlackEval &) | |
Private Attributes | |
BTreeCompactor | _btree |
vector< double > | _xSlack |
vector< double > | _ySlack |
vector< double > | _xlocRight |
vector< double > | _ylocTop |
vector< BTree::BTreeNode > | _rev_tree |
vector< BTree::BTreeNode > | _rev_orth_tree |
|
Definition at line 86 of file btreeslackeval.h. References _rev_orth_tree, _rev_tree, and BTree::clean_tree().
00087 : _btree(newBTree), 00088 _xSlack(newBTree.NUM_BLOCKS), 00089 _ySlack(newBTree.NUM_BLOCKS), 00090 _xlocRight(newBTree.NUM_BLOCKS), 00091 _ylocTop(newBTree.NUM_BLOCKS), 00092 _rev_tree(newBTree.tree.size()), 00093 _rev_orth_tree(newBTree.tree.size()) 00094 { 00095 BTree::clean_tree(_rev_tree); 00096 BTree::clean_tree(_rev_orth_tree); 00097 } |
Here is the call graph for this function:
|
|
|
Definition at line 112 of file btreeslackeval.h. References _btree.
00113 { return _btree; } |
|
Definition at line 99 of file btreeslackeval.h. References _btree, evaluateXSlacks(), evaluateYSlacks(), and BTreeCompactor::slimAssign(). Referenced by BTreeAreaWireAnnealer::DBfromSoln(), BTreeAreaWireAnnealer::makeARWLMove(), BTreeAreaWireAnnealer::makeIndexSoftBlMove(), BTreeAreaWireAnnealer::makeMoveSlacksCore(), BTreeAreaWireAnnealer::makeSoftBlMove(), and BTreeAreaWireAnnealer::packSoftBlocks().
00100 { 00101 _btree.slimAssign(newBTree); 00102 evaluateXSlacks(newBTree); // mess with "_btree" only 00103 evaluateYSlacks(newBTree); 00104 } |
Here is the call graph for this function:
|
Definition at line 45 of file btreeslackeval.cxx. References _btree, _rev_orth_tree, _xlocRight, _xSlack, BTreeCompactor::build_orth_tree(), BTree::evaluate(), BTree::NUM_BLOCKS, BTreeCompactor::orth_tree, reverse_tree(), BTree::totalWidth(), BTree::width(), BTree::xloc(), and BTree::yloc(). Referenced by evaluateSlacks().
00046 { 00047 const int NUM_BLOCKS = orig_btree.NUM_BLOCKS; 00048 _btree.build_orth_tree(); 00049 00050 reverse_tree(_btree.orth_tree, _rev_orth_tree); 00051 _btree.evaluate(_rev_orth_tree); 00052 00053 double width = orig_btree.totalWidth(); 00054 for (int i = 0; i < NUM_BLOCKS; i++) 00055 { 00056 _xlocRight[i] = _btree.yloc(i); 00057 _xSlack[i] = width - 00058 orig_btree.width(i) - _xlocRight[i] - orig_btree.xloc(i); 00059 } 00060 return _xSlack; 00061 } |
Here is the call graph for this function:
|
Definition at line 63 of file btreeslackeval.cxx. References _btree, _rev_tree, _ylocTop, _ySlack, BTree::evaluate(), BTree::height(), BTree::NUM_BLOCKS, reverse_tree(), BTree::totalHeight(), BTree::tree, and BTree::yloc(). Referenced by evaluateSlacks().
00064 { 00065 reverse_tree(orig_btree.tree, _rev_tree); 00066 _btree.evaluate(_rev_tree); 00067 00068 const int NUM_BLOCKS = _btree.NUM_BLOCKS; 00069 double height = orig_btree.totalHeight(); 00070 for (int i = 0; i < NUM_BLOCKS; i++) 00071 { 00072 _ylocTop[i] = _btree.yloc(i); 00073 _ySlack[i] = height - 00074 orig_btree.height(i) - _ylocTop[i] - orig_btree.yloc(i); 00075 } 00076 return _ySlack; 00077 } |
Here is the call graph for this function:
|
Definition at line 118 of file btreeslackeval.h. References _rev_orth_tree.
00119 { return _rev_orth_tree; } |
|
Definition at line 115 of file btreeslackeval.h. References _rev_tree.
00116 { return _rev_tree; } |
|
Definition at line 79 of file btreeslackeval.cxx. References BTree::clean_tree(), and BTree::UNDEFINED. Referenced by evaluateXSlacks(), and evaluateYSlacks().
00081 { 00082 // assume "rev_tree" has the same size as "tree" 00083 BTree::clean_tree(rev_tree); 00084 00085 static const int UNDEFINED = BTree::UNDEFINED; 00086 const int NUM_BLOCKS = tree.size() - 2; 00087 int tree_prev = NUM_BLOCKS; 00088 int tree_curr = tree[NUM_BLOCKS].left; // start with the first child of root 00089 vector<int> true_parent(tree.size(), UNDEFINED); // book-keeping variable 00090 while (tree_curr != NUM_BLOCKS) 00091 { 00092 if (tree_prev == tree[tree_curr].parent) 00093 { 00094 if (tree_curr == tree[tree_prev].left) 00095 { 00096 // left-child 00097 rev_tree[tree_prev].left = tree_curr; 00098 rev_tree[tree_curr].parent = tree_prev; 00099 rev_tree[tree_curr].block_index = tree[tree_curr].block_index; 00100 rev_tree[tree_curr].orient = tree[tree_curr].orient; 00101 00102 true_parent[tree_curr] = tree_prev; 00103 } 00104 else 00105 { 00106 // right-child 00107 int tree_parent = true_parent[tree_prev]; 00108 rev_tree[tree_parent].left = tree_curr; // prob. overwrite 00109 rev_tree[tree_curr].parent = tree_parent; 00110 rev_tree[tree_curr].block_index = tree[tree_curr].block_index; 00111 rev_tree[tree_curr].orient = tree[tree_curr].orient; 00112 00113 rev_tree[tree_prev].parent = tree_curr; 00114 rev_tree[tree_curr].right = tree_prev; 00115 00116 true_parent[tree_curr] = tree_parent; 00117 } 00118 tree_prev = tree_curr; 00119 if (tree[tree_curr].right != UNDEFINED) 00120 tree_curr = tree[tree_curr].right; 00121 else if (tree[tree_curr].left != UNDEFINED) 00122 tree_curr = tree[tree_curr].left; 00123 else 00124 tree_curr = tree[tree_curr].parent; 00125 } 00126 else if (tree_prev == tree[tree_curr].right) 00127 { 00128 tree_prev = tree_curr; 00129 tree_curr = (tree[tree_curr].left != UNDEFINED)? 00130 tree[tree_curr].left : tree[tree_curr].parent; 00131 } 00132 else 00133 { 00134 tree_prev = tree_curr; 00135 tree_curr = tree[tree_curr].parent; 00136 } 00137 } 00138 } |
Here is the call graph for this function:
|
|
|
Definition at line 106 of file btreeslackeval.h. References _xSlack. Referenced by BTreeAreaWireAnnealer::DBfromSoln(), BTreeAreaWireAnnealer::getSoftBlIndex(), BTreeAreaWireAnnealer::getSoftBlNewDimensions(), BTreeAreaWireAnnealer::makeARWLMove(), BTreeAreaWireAnnealer::makeMoveSlacksCore(), and BTreeAreaWireAnnealer::packSoftBlocks().
00107 { return _xSlack; } |
|
|
|
Definition at line 109 of file btreeslackeval.h. References _ySlack. Referenced by BTreeAreaWireAnnealer::DBfromSoln(), BTreeAreaWireAnnealer::getSoftBlIndex(), BTreeAreaWireAnnealer::getSoftBlNewDimensions(), BTreeAreaWireAnnealer::makeARWLMove(), BTreeAreaWireAnnealer::makeMoveSlacksCore(), and BTreeAreaWireAnnealer::packSoftBlocks().
00110 { return _ySlack; } |
|
Definition at line 69 of file btreeslackeval.h. Referenced by btree(), evaluateSlacks(), evaluateXSlacks(), and evaluateYSlacks(). |
|
Definition at line 77 of file btreeslackeval.h. Referenced by BTreeSlackEval(), evaluateXSlacks(), and rev_orth_tree(). |
|
Definition at line 76 of file btreeslackeval.h. Referenced by BTreeSlackEval(), evaluateYSlacks(), and rev_tree(). |
|
Definition at line 73 of file btreeslackeval.h. Referenced by evaluateXSlacks(). |
|
Definition at line 70 of file btreeslackeval.h. Referenced by evaluateXSlacks(), and xSlack(). |
|
Definition at line 74 of file btreeslackeval.h. Referenced by evaluateYSlacks(). |
|
Definition at line 71 of file btreeslackeval.h. Referenced by evaluateYSlacks(), and ySlack(). |