Main Page | Modules | Class List | File List | Class Members | File Members

atlas.h

Go to the documentation of this file.
00001 // The following ifdef block is the standard way of creating macros which make exporting 
00002 // from a DLL simpler. All files within this DLL are compiled with the ATLAS_EXPORTS
00003 // symbol defined on the command line. this symbol should not be defined on any project
00004 // that uses this DLL. This way any other project whose source files include this file see 
00005 // ATLAS_API functions as being imported from a DLL, whereas this DLL sees symbols
00006 // defined with this macro as being exported.
00007 #ifdef ATLAS_EXPORTS
00008 #define ATLAS_API __declspec(dllexport)
00009 #else
00010 #define ATLAS_API __declspec(dllimport)
00011 #endif
00012 
00014 typedef float AT_scalar;
00015 //typedef double AT_scalar;
00016 
00018 typedef AT_scalar (* AT_CalculateDistanceCallbackType) (int vID0, int vID1, void *userDef);
00019 typedef AT_scalar (* AT_AstarHeuristicCallbackType) (int vID0, int vID1, void *userDef);
00020 
00037 
00038 
00041 #define AT_SUCCESS                  0
00042 
00043 #define AT_ILLEGAL_VALUE           -1
00044 
00045 #define AT_EDGE_ALREADY_EXISTS     -2
00046 
00047 #define AT_NO_PATH_FOUND           -3
00048 
00049 #define AT_NO_SUCH_VERTEX          -4
00050 
00051 #define AT_NO_SUCH_EDGE            -5
00052 
00053 #define AT_GRAPH_DIRECTED          -6
00054 
00055 #define AT_NEED_RECALCULATION      -7
00056 
00058 class ATLAS_API CAtlas {
00059         //added by Arno
00060 private:
00061         void* main;
00062         //end added by Arno
00063 public:
00070   CAtlas (int dimension, bool directed);
00071 
00075   virtual ~CAtlas ();
00076 
00082   int GetDimension (int *dimension);
00083 
00084   // vertex functions
00092   int AddVertex (AT_scalar *conf, int *vID, void *userDef=NULL);
00093 
00099   int RemoveVertex (int vID);
00100 
00108   int GetVertexConfiguration (int vID, AT_scalar* conf, void **userDef=NULL);
00109 
00115   int GetNrVertices (int *nr);
00116 
00122   int GetVertices (int *vIDs);
00123 
00130   int SetUserDef (int vID, void *userDef);
00131 
00132   // edge functions
00141   int AddEdge (int vID0, int vID1, AT_scalar value, void *userDef=NULL);
00142 
00149   int RemoveEdge (int vID0, int vID1);
00150 
00157   int GetNrPredecessors (int vID, int *nr);
00158 
00165   int GetNrSuccessors (int vID, int *nr);
00166 
00174   int GetSuccessor (int vID, int nr, int *nID);
00175 
00183   int GetPredecessor (int vID, int nr, int *nID);
00184 
00191   int GetPredecessors (int vID, int *ids);
00192 
00199   int GetSuccessors (int vID, int *ids);
00200 
00209   int SetEdgeConfiguration (int vID0, int vID1, AT_scalar value, void *userDef=NULL);
00210 
00219   int GetEdgeConfiguration (int vID0, int vID1, AT_scalar *value, void **userDef=NULL);
00220 
00228   int SetEdgeInvalidation (int vID0, int vID1, bool invalidate);
00229 
00230   // query functions
00236   int FindShortestPaths (int startID);
00237 
00242   int FindAllPairsShortestPaths ();
00243 
00253   int AStar (int startID, int goalID, AT_AstarHeuristicCallbackType ASHCB, int *size, void *userDef=NULL);
00254 
00261   int GetAStarQueryVertex (int nr, int *vID);
00262 
00270   int Query (int goalID, int *size, AT_scalar *length=NULL);
00271 
00280   int Query (int startID, int goalID, int *size, AT_scalar *length=NULL);
00281 
00288   int GetQueryVertex (int nr, int* vID);
00289 
00297   int VerticesConnected (int vID0, int vID1, bool *connected);
00298 
00299   //misc
00304   int ResetGraph ();
00305 
00311   int LoadGraph (char *fileName);
00312 
00318   int SaveGraph (char *fileName);
00319 
00330   int CheckUsefulCycle (int startID, int goalID, AT_scalar K, AT_CalculateDistanceCallbackType calcDistCB, bool *result, void *userDef=NULL);
00331 };
00332 

Generated on Mon Jun 19 14:48:51 2006 for Atlas 1.3 by  doxygen 1.4.2