00001 /* 00002 * MatrixOracle.h 00003 * 00004 * Created on: Dec 8, 2010 00005 * Author: bert 00006 * A special type of WeightOracle that explicitly stores the 00007 * weight matrix between all pairs of nodes, and weight lookups 00008 * are simply matrix lookups. 00009 */ 00010 00011 #include "WeightOracle.h" 00012 00013 #ifndef MATRIXORACLE_H_ 00014 #define MATRIXORACLE_H_ 00015 00016 00021 class MatrixOracle: public WeightOracle { 00022 public: 00027 MatrixOracle(int n, double ** w); 00028 virtual ~MatrixOracle(); 00029 00030 int getSize(); 00031 00032 double computeWeight(int row, int col); 00033 00034 private: 00035 int size; 00036 double ** weights; 00037 bool selfLoops; 00038 }; 00039 00040 #endif /* MATRIXORACLE_H_ */