2D Placement Problem More...

#include <rproblem2d.h>

Inheritance diagram for RProblem2D:
[legend]
Collaboration diagram for RProblem2D:
[legend]

Public Member Functions

 RProblem2D (const RString &name)
 
void DetermineBoard (void)
 
void SetLimits (const RSize &limits)
 
RSize GetLimits (void) const
 
RRect GetBoard (void) const
 
void SetWeightedDistances (bool weighted)
 
bool MustWeightedDistances (void) const
 
void Insert (RObj2D *obj)
 
size_t GetNbObjs (void) const
 
RObj2DGetObj (size_t id) const
 
RObj2DGetObj (const RString &name) const
 
RCursor< RObj2DGetObjs (void) const
 
void Insert (RConnection *con)
 
size_t GetNbConnections (void) const
 
RConnectionGetConnection (const RString &name) const
 
const RCursor< RConnectionGetConnections (void) const
 
RObj2DConnectorInsertConnector (size_t id, const RString &name)
 
 ~RProblem2D (void)
 
- Public Member Functions inherited from RObj2D
 RObj2D (size_t id, const RString &name)
 
int Compare (const RObj2D *o) const
 
int Compare (const RObj2D &o) const
 
int Compare (const size_t id) const
 
int Compare (const RString &name) const
 
void CreateOri (tOrientation ori)
 
size_t GetId (void) const
 
void SetId (size_t id)
 
RString GetName (void) const
 
virtual bool IsIn (size_t id) const
 
RObj2DConfigGetDefaultConfig (void)
 
size_t GetNbConnectors (void) const
 
RCursor< RObj2DConnectorGetConnectors (void) const
 
template<class TUse >
RObj2DConnectorGetConnector (const TUse &use, bool order=true) const
 
double GetConnectorWeights (void) const
 
void Copy (const RObj2D &obj)
 
virtual ~RObj2D (void)
 
- Public Member Functions inherited from RContainer< RObj2DConfig, true, true >
 RContainer (size_t m, size_t i=0)
 
 RContainer (const RContainer< RObj2DConfig, true, true > &src)
 
 RContainer (const RContainer< RObj2DConfig, false, true > &src)
 
int Compare (const RContainer< RObj2DConfig, true, true > &) const
 
size_t GetNb (void) const
 
size_t GetMaxPos (void) const
 
size_t GetMaxNb (void) const
 
size_t GetIncNb (void) const
 
bool VerifyIndex (size_t idx) const
 
void VerifyTab (size_t max=0)
 
void Clear (size_t m=0, size_t i=0, bool force=false)
 
void ReOrder (int sortOrder(const void *, const void *), size_t min, size_t max)
 
void ReOrder (int sortOrder(const void *, const void *))
 
void ReOrder (void)
 
void Exchange (size_t pos1, size_t pos2)
 
void Shift (size_t idx, bool reverse)
 
void Transfer (RContainer< RObj2DConfig, a, o > &src)
 
RContaineroperator= (const RContainer< RObj2DConfig, true, true > &src)
 
RContaineroperator= (const RContainer< RObj2DConfig, false, true > &src)
 
void Copy (const RContainer< RObj2DConfig, a, true > &src)
 
RContaineroperator+= (const RContainer< RObj2DConfig, a, o > &src)
 
size_t GetIndex (const TUse &tag, bool &find, size_t min=0, size_t max=0) const
 
bool IsIn (const TUse &tag, bool sortkey, size_t min=0, size_t max=0) const
 
bool IsIn (const TUse &tag, size_t min=0, size_t max=0) const
 
const RObj2DConfigoperator[] (size_t idx) const
 
RObj2DConfigoperator[] (size_t idx)
 
const RObj2DConfigGetPtrAt (size_t idx) const
 
RObj2DConfigGetPtrAt (size_t idx)
 
RObj2DConfigGetPtr (const TUse &tag, bool sortkey, size_t min=0, size_t max=0) const
 
RObj2DConfigGetPtr (const TUse &tag, size_t min=0, size_t max=0) const
 
RObj2DConfigGetInsertPtr (const TUse &tag, bool sortkey, size_t min=0, size_t max=0)
 
RObj2DConfigGetInsertPtr (const TUse &tag, size_t min=0, size_t max=0)
 
RObj2DConfigGetInsertPtrAt (const TUse &tag, size_t pos)
 
RContainer< RObj2DConfig,
false, true > * 
GetPtrs (const TUse &tag, size_t min=0, size_t max=0) const
 
size_t GetTab (const void **tab, size_t min=0, size_t max=0) const
 
size_t GetTab (void **tab, size_t min=0, size_t max=0)
 
size_t GetTab (const RObj2DConfig **tab, size_t min=0, size_t max=0) const
 
size_t GetTab (RObj2DConfig **tab, size_t min=0, size_t max=0)
 
void InsertPtrAt (RObj2DConfig *ins, size_t pos, bool del)
 
void InsertPtrAt (RObj2DConfig *ins, size_t pos)
 
void InsertPtr (RObj2DConfig *ins, bool del=false, size_t min=0, size_t max=0)
 
void DeletePtrAt (size_t pos, bool shift, bool del)
 
void DeletePtrAt (size_t pos, bool shift)
 
void DeletePtrAt (size_t pos)
 
void DeletePtr (const TUse &tag, bool sortkey, bool del, size_t min=0, size_t max=0)
 
void DeletePtr (const TUse &tag, bool sortkey, size_t min=0, size_t max=0)
 
void DeletePtr (const TUse &tag, size_t min=0, size_t max=0)
 
void Inter (const iRContainer< RObj2DConfig > &src1, const iRContainer< RObj2DConfig > &src2)
 
void Union (const iRContainer< RObj2DConfig > &src1, const iRContainer< RObj2DConfig > &src2)
 
virtual ~RContainer (void)
 
- Public Member Functions inherited from iRContainer< C >
size_t GetNb (void) const
 
size_t GetMaxPos (void) const
 
size_t GetMaxNb (void) const
 
size_t GetIncNb (void) const
 
bool VerifyIndex (size_t idx) const
 
void VerifyTab (size_t max=0)
 
void Clear (size_t m=0, size_t i=0, bool force=false)
 
void ReOrder (int sortOrder(const void *, const void *), size_t min, size_t max)
 
void ReOrder (int sortOrder(const void *, const void *))
 
void ReOrder (void)
 
void Exchange (size_t pos1, size_t pos2)
 
void Shift (size_t idx, bool reverse)
 
void Transfer (iRContainer< C > &src)
 
iRContaineroperator= (const iRContainer< C > &src)
 
void Copy (const iRContainer< C > &src)
 
iRContaineroperator+= (const iRContainer< C > &src)
 
size_t GetIndex (bool order, const TUse &tag, bool &find, size_t min=0, size_t max=0) const
 
size_t GetIndex (const TUse &tag, bool &find, size_t min=0, size_t max=0) const
 
bool IsIn (const TUse &tag, bool sortkey, size_t min=0, size_t max=0) const
 
bool IsIn (const TUse &tag, size_t min=0, size_t max=0) const
 
const C * operator[] (size_t idx) const
 
C * operator[] (size_t idx)
 
const C * GetPtrAt (size_t idx) const
 
C * GetPtrAt (size_t idx)
 
C * GetPtr (const TUse &tag, bool sortkey, size_t min=0, size_t max=0) const
 
C * GetPtr (const TUse &tag, size_t min=0, size_t max=0) const
 
C * GetInsertPtr (const TUse &tag, bool sortkey, size_t min=0, size_t max=0)
 
C * GetInsertPtr (const TUse &tag, size_t min=0, size_t max=0)
 
C * GetInsertPtrAt (const TUse &tag, size_t pos)
 
size_t GetTab (const void **tab, size_t min=0, size_t max=0) const
 
size_t GetTab (void **tab, size_t min=0, size_t max=0)
 
size_t GetTab (const C **tab, size_t min=0, size_t max=0) const
 
size_t GetTab (C **tab, size_t min=0, size_t max=0)
 
void InsertPtrAt (C *ins, size_t pos, bool del)
 
void InsertPtrAt (C *ins, size_t pos)
 
void InsertPtr (C *ins, bool del=false, size_t min=0, size_t max=0)
 
void DeletePtrAt (size_t pos, bool shift, bool del)
 
void DeletePtrAt (size_t pos, bool shift)
 
void DeletePtrAt (size_t pos)
 
void DeletePtr (const TUse &tag, bool sortkey, bool del, size_t min=0, size_t max=0)
 
void DeletePtr (const TUse &tag, bool sortkey, size_t min=0, size_t max=0)
 
void DeletePtr (const TUse &tag, size_t min=0, size_t max=0)
 
void Inter (const iRContainer< C > &src1, const iRContainer< C > &src2)
 
void Union (const iRContainer< C > &src1, const iRContainer< C > &src2)
 
virtual ~iRContainer (void)
 

Private Attributes

RSize Limits
 
RRect Board
 
RContainer< RObj2D, true, true > Objs
 
RContainer< RConnection, true,
false > 
Connections
 
bool WeightedDistances
 

Additional Inherited Members

- Static Public Member Functions inherited from RContainer< RObj2DConfig, true, true >
static int SortOrder (const void *a, const void *b)
 
- Static Public Member Functions inherited from iRContainer< C >
static int SortOrder (const void *a, const void *b)
 
- Protected Member Functions inherited from iRContainer< C >
void Create (const iRContainer< C > &src)
 
iRContainerNormalCopy (const iRContainer< C > &src)
 
void DeepCopy (const iRContainer< C > &src)
 
iRContainerAdd (const iRContainer< C > &src)
 
- Protected Attributes inherited from RObj2D
size_t Id
 
RString Name
 
RContainer< RObj2DConnector,
true, true > 
Connectors
 
- Protected Attributes inherited from iRContainer< C >
C ** Tab
 
size_t NbPtr
 
size_t MaxPtr
 
size_t LastPtr
 
size_t IncPtr
 

Detailed Description

2D Placement Problem

The RProblem2D class provides a representation for a 2D placement problem.

Constructor & Destructor Documentation

RProblem2D ( const RString name)

Constructor of the problem.

Parameters
nameName of the problem.
~RProblem2D ( void  )

Destructor of the problem.

Member Function Documentation

void DetermineBoard ( void  )

Determine the limits of the problem based of the shape.

void SetLimits ( const RSize limits)

Set the limits of the placement.

Parameters
limitsLimits.
RSize GetLimits ( void  ) const
Returns
the limits for the construction.
RRect GetBoard ( void  ) const
Returns
the board for the construction.
void SetWeightedDistances ( bool  weighted)

Set if the distances must be weighted.

Parameters
weightedMust the distances be weighed.
bool MustWeightedDistances ( void  ) const

Look if the distances must be weighted.

Returns
true if yes.
void Insert ( RObj2D obj)

Insert an object to the problem.

Parameters
objObject to add.
size_t GetNbObjs ( void  ) const
Returns
the number of objects.
RObj2D* GetObj ( size_t  id) const
Returns
a pointer to a given object.
Parameters
idIdentifier of the object.
RObj2D* GetObj ( const RString name) const
Returns
a pointer to a given object.
Parameters
nameName of the object.
RCursor<RObj2D> GetObjs ( void  ) const
Returns
a cursor over the objects.
void Insert ( RConnection con)

Insert a connection.

Parameters
conConnection to insert.
size_t GetNbConnections ( void  ) const
Returns
the number of connections.
RConnection* GetConnection ( const RString name) const
Returns
a pointer to a given connection.
Parameters
nameName of the connection.
const RCursor<RConnection> GetConnections ( void  ) const
Returns
the connections.
RObj2DConnector* InsertConnector ( size_t  id,
const RString name 
)

Insert a connector to the board.

Parameters
idIdentifier of the connector.
nameName of the connector.
Returns
a pointer to connector created.

Member Data Documentation

RSize Limits
private

Limits for the construction.

RRect Board
private

Board (including the connectors).

RContainer<RObj2D,true,true> Objs
private

Objects.

RContainer<RConnection,true,false> Connections
private

Connections.

bool WeightedDistances
private

Should the distances computed be weighted?.