You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

graph.h 648 B

1234567891011121314151617181920212223242526
  1. #ifndef GRAPH_H
  2. #define GRAPH_H
  3. #include <map>
  4. #include <vector>
  5. #include <utility>
  6. class Graph {
  7. private:
  8. std::map<long int, std::vector<std::pair<double, long int> > > nodes;
  9. static Graph* instance;
  10. Graph();
  11. public:
  12. static long int uid_counter;
  13. static long int uid();
  14. static Graph* getInstance();
  15. void connect(const long int& uid, const std::pair<double, long int>& edge);
  16. std::vector<std::pair<double, long int> > get(const long int& uid) const;
  17. bool has(const long int& uid) const;
  18. void new_recording();
  19. };
  20. #endif /* end of include guard: GRAPH_H */

Edge : 一个开源的科学计算引擎

Contributors (1)