visualizations

Programmatic visualizations
git clone git://git.laack.co/visualizations.git
Log | Files | Refs | README

edge.cpp (432B)


      1 #include "edge.hpp"
      2 
      3 Edge::Edge(std::size_t v1, std::size_t v2, float length2)
      4     : v1Index(v1), v2Index(v2), length2(length2) {}
      5 
      6 std::string Edge::toString() {
      7     return "(" + std::to_string(this->v1Index) + ", " + std::to_string(this->v2Index) + ")";
      8 }
      9 
     10 bool Edge::operator<(const Edge& other) const {
     11     return length2 < other.length2;
     12 }
     13 
     14 bool Edge::operator>(const Edge& other) const {
     15     return length2 > other.length2;
     16 }