00001 /************************************************************************** 00002 *** 00003 *** Copyright (c) 1995-2000 Regents of the University of California, 00004 *** Andrew E. Caldwell, Andrew B. Kahng and Igor L. Markov 00005 *** Copyright (c) 2000-2004 Regents of the University of Michigan, 00006 *** Saurabh N. Adya, Jarrod A. Roy and Igor L. Markov 00007 *** 00008 *** Contact author(s): abk@cs.ucsd.edu, imarkov@umich.edu 00009 *** Original Affiliation: UCLA, Computer Science Department, 00010 *** Los Angeles, CA 90095-1596 USA 00011 *** 00012 *** Permission is hereby granted, free of charge, to any person obtaining 00013 *** a copy of this software and associated documentation files (the 00014 *** "Software"), to deal in the Software without restriction, including 00015 *** without limitation 00016 *** the rights to use, copy, modify, merge, publish, distribute, sublicense, 00017 *** and/or sell copies of the Software, and to permit persons to whom the 00018 *** Software is furnished to do so, subject to the following conditions: 00019 *** 00020 *** The above copyright notice and this permission notice shall be included 00021 *** in all copies or substantial portions of the Software. 00022 *** 00023 *** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 00024 *** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 00025 *** OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 00026 *** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 00027 *** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT 00028 *** OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR 00029 *** THE USE OR OTHER DEALINGS IN THE SOFTWARE. 00030 *** 00031 *** 00032 ***************************************************************************/ 00033 00034 00035 00036 00037 #ifndef BTREEFROMSSTREE_H 00038 #define BTREEFROMSSTREE_H 00039 00040 //#include "datastrfrontsoftst.h" 00041 00042 #include "basepacking.h" 00043 #include "btree.h" 00044 00045 #include <string> 00046 #include <vector> 00047 using namespace std; 00048 00049 // -------------------------------------------------------- 00050 class SoftPackingHardBlockInfoType : public HardBlockInfoType 00051 { 00052 public: 00053 SoftPackingHardBlockInfoType(const SoftPacking& spk); 00054 }; 00055 // -------------------------------------------------------- 00056 class BTreeFromSoftPacking : public BTree 00057 { 00058 public: 00059 BTreeFromSoftPacking(const HardBlockInfoType& nBlockinfo, 00060 const SoftPacking& spk); 00061 BTreeFromSoftPacking(const HardBlockInfoType& nBlockinfo, 00062 const SoftPacking& spk, 00063 double nTolerance); 00064 00065 protected: 00066 class SymbolicNodeType 00067 { 00068 public: 00069 SymbolicNodeType(int s, int BL, int TL, int R, double w) 00070 : sign(s), BL_block(BL), TL_block(TL), R_block(R), width(w) {} 00071 00072 int sign; 00073 int BL_block; 00074 int TL_block; 00075 int R_block; 00076 double width; 00077 }; 00078 vector<SymbolicNodeType> in_buffer; 00079 void EvaluateTree(const SoftPacking& spk); 00080 }; 00081 // -------------------------------------------------------- 00082 00083 #endif