| 132 | |
| 133 | template<class T> |
| 134 | void Visualizer::plot( |
| 135 | const std::vector<T>& v_t, |
| 136 | const std::vector<double>& color) { |
| 137 | if constexpr (std::is_same<T, F2CPoint>::value) { |
| 138 | auto comp = getComponents(v_t); |
| 139 | plot(comp[0], comp[1], color); |
| 140 | } else if constexpr (std::is_same<T, double>::value) { |
| 141 | std::vector<double> t(v_t.size()); |
| 142 | std::iota(std::begin(t), std::end(t), 0.0); |
| 143 | plot(t, v_t, color); |
| 144 | } else { |
| 145 | for (auto&& t : v_t) { |
| 146 | plot(t, color); |
| 147 | } |
| 148 | } |
| 149 | } |
| 150 | |
| 151 | } // namespace f2c |
| 152 | |