1 
2 // This file is part of the Alliance Project.
3 // Copyright (C) Laboratoire LIP6 - Departement ASIM
4 // Universite Pierre et Marie Curie
5 //
6 // The Alliance Project  is free software;  you can  redistribute it and/or
7 // modify  it  under the  terms  of  the  GNU  General  Public License  as
8 // published by  the Free  Software Foundation; either  version 2  of  the
9 // License, or (at your option) any later version.
10 //
11 // The Alliance Project  is distributed in the hope that it will be useful,
12 // but  WITHOUT  ANY  WARRANTY;  without  even  the  implied  warranty  of
13 // MERCHANTABILITY  or  FITNESS  FOR A  PARTICULAR PURPOSE.   See  the GNU
14 // General Public License for more details.
15 //
16 // You should have received a copy  of  the  GNU  General  Public  License
17 // along with  the Alliance Project;  if  not,  write to the  Free Software
18 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 //
20 //
21 // License-Tag
22 //
23 // Date   : 29/01/2004
24 // Author : Christophe Alexandre  <Christophe.Alexandre@lip6.fr>
25 //
26 // Authors-Tag
27 #ifndef __PMove_h
28 #define __PMove_h
29 
30 #include <PPlacement.h>
31 #include <PPos.h>
32 #include <map>
33 
34 class PMove {
35   private:
36 
37     PPlacement&			_placement;
38 
39     PToPlaceIns*		_srcIns;
40     PBin*			_srcBin;
41     double			_srcBinInitCost;
42     PSubRow*			_srcSubRow;
43     PRow*			_srcRow;
44     double			_srcRowInitCost;
45     double			_srcWidth;
46 
47     PBin*			_dstBin;
48     double			_dstBinInitCost;
49     PSubRow*			_dstSubRow;
50     PRow*			_dstRow;
51     double			_dstRowInitCost;
52     PToPlaceIns*		_dstIns;
53     double			_dstWidth;
54 
55     map<PONet*, unsigned>	_affectedNets;
56 
57   public:
58 			PMove(PPlacement& placement);
59 
60     double		GetDeltaRowCost();
61     double		GetDeltaBinCost();
62     double		GetDeltaNetCost();
63 
64     bool		Next(const double dist);
65     void		Accept();
66     void		Reject();
67     void		Move();
68 };
69 
70 #endif /* __PMove_h */
71