|
Developer Documentation |
|
Centre for Vision, Speech & Signal Processing |
|
PUBLIC |
TSPCostC::TSPCostC(TraceC,int,int)
TSPCostC::~TSPCostC(void)
TSPCostC::Energy(int,int,int,int)
SimplePairwiseCostC::Energy(int,int,int,int)
SimplePairwiseCostC::Energy(const HardAssignC &)
SimplePairwiseCostC::Energy(const SoftAssignC &)
SimplePairwiseCostC::GetMFTSupport(SoftAssignC &,int,const SoftAssignC &)
SimplePairwiseCostC::GetMFTSupport(const SoftAssignC &)
SimplePairwiseCostC::GetGradAssSupport(SoftAssignC &,int,const SoftAssignC &)
SimplePairwiseCostC::GetGradAssSupport(const SoftAssignC &)
SimplePairwiseCostC::GetEnergy(int,int,const HardAssignC &)
SimplePairwiseCostC::LoadEnergy(int,const HardAssignC &)
BaseCostC::TrapUndefinedVirtual(const char *)
BaseCostC::Energy(int,int,int,int)
BaseCostC::Energy(const HardAssignC &)
BaseCostC::Energy(const SoftAssignC &)
BaseCostC::GetMFTSupport(SoftAssignC &,int,const SoftAssignC &)
BaseCostC::GetMFTSupport(const SoftAssignC &)
BaseCostC::GetGradAssSupport(SoftAssignC &,int,const SoftAssignC &)
BaseCostC::GetGradAssSupport(const SoftAssignC &)
BaseCostC::GetEnergy(int,int,const HardAssignC &)
BaseCostC::LoadEnergy(int,const HardAssignC &)
TraceC::TraceC(int,ostream &)
TraceC::~TraceC(void)
TraceC::TraceC(const TraceC &)
|
Comments:
-------------------------------------------------------------------------
*************************************************************************
-------------------------------------------------------------------------
-------------------------------------------------------------------------
-------------------------------------------------------------------------
A simple cost to test various optimizers. The cost is the
travelling salesman problem.
The cities are randomly distributed within the unit cube.
The problem is completely determined by the coefficients E(i,j,a,b)
And we seek a solution with the i-th visit being to city a-th.
The trip must start from (0,0,0) and finish in (1,1,1) after
visiting all cities.
For (i != j=/-1 ) the only cost is a penalty to avoid double visits
This will not affect an assignment algorithm.
nlabs must be equal nobjs
It appears that the TSP problem with Grad Ass can flip flop
since the global best path between 2 points may not be
the local best path, surprisingly SA does OK on this.
-------------------------------------------------------------------------
Parent Classes:
Variables:
- SArray1dC towns;
-
Methods:
- TSPCostC(TraceC t = TraceC(),int _nobjs = 10,int idum = -1)
-
- ~TSPCostC()
-
Constructor
- double Energy(int i,int j,int a,int b)
-
double Energy(const HardAssignC & r)
{ return SimplePairwiseCostC::Energy(r); }
- double Energy(int i,int j,int a,int b)
-
return the pairwise energy
Thes functions are taken care of now for you
--------------------------------------------
- double Energy(const HardAssignC & r)
-
- double Energy(const SoftAssignC & r)
-
return the energy of the overall labelling
It is assumed that this is slower and to be used sparingly
MFTCostC stuff
--------------
- void GetMFTSupport(SoftAssignC & q,int i,const SoftAssignC & work)
-
returns the support for one object
- SoftAssignC GetMFTSupport(const SoftAssignC & work)
-
returns the support
GradAssCostC stuff
------------------
- void GetGradAssSupport(SoftAssignC & q,int i,const SoftAssignC & work)
-
returns the support for one object
- SoftAssignC GetGradAssSupport(const SoftAssignC & work)
-
returns the support
SACostC stuff
-------------
- double GetEnergy(int i,int a,const HardAssignC & r)
-
get the energy for object i with label a, or at least the part
of the energy affected by changing labels on object i only
- RealSArray1dC LoadEnergy(int i,const HardAssignC & r)
-
Load up the array work with the energies for each label of object i
given global assignment r
- void TrapUndefinedVirtual(const char * fname)
-
the crude but efective way to catch virtual functions that have
not been overridden
- double Energy(int i,int j,int a,int b)
-
return the pairwise energy
- double Energy(const HardAssignC & r)
-
return the energy of the overall labelling
It is assumed that this is slower and to be used sparingly
- double Energy(const SoftAssignC & r)
-
return the energy of the overall labelling
It is assumed that this is slower and to be used sparingly
Mean Field Theory
-----------------
- void GetMFTSupport(SoftAssignC & q,int i,const SoftAssignC & work)
-
returns the support for one object
- SoftAssignC GetMFTSupport(const SoftAssignC & work)
-
returns the support
Graduated assignment
--------------------
- void GetGradAssSupport(SoftAssignC & q,int i,const SoftAssignC & work)
-
returns the support for one object
- SoftAssignC GetGradAssSupport(const SoftAssignC & work)
-
returns the support
Simulated Annealing
-------------------
- double GetEnergy(int i,int a,const HardAssignC & r)
-
get the energy for object i with label a, or at least the part
of the energy affected by changing labels on object i only
- RealSArray1dC LoadEnergy(int i,const HardAssignC & r)
-
Load up the array work with the energies for each label of object i
given global assignment r
- Inline TraceC(int tl = NoTrace,ostream & os = cout)
-
Constructor
- Inline ~TraceC()
-
Destructor
- Inline TraceC(const TraceC & t)
-
Copy Constructor
|
Programmer:Andrew Stoddart, Documentation by CxxDoc: Tue Mar 20 10:49:27 2001
|