Lines Matching refs:graph

47 int curves(const PixelGraph &graph, PixelGraph::const_iterator a,
68 void operator()(const PixelGraph &graph, unsigned radius);
232 PixelGraph graph(buf);
242 assert(graph.width() > 0);
243 assert(graph.height() > 0);
246 graph.checkConsistency();
255 graph.connectAllNeighbors();
264 graph.checkConsistency();
273 _disconnect_neighbors_with_dissimilar_colors(graph);
283 graph.checkConsistency();
294 PixelGraph::EdgePairContainer edges = graph.crossingEdges();
314 graph.checkConsistency();
321 _remove_crossing_edges_unsafe(graph, edges, options);
332 graph.checkConsistency();
335 assert(graph.crossingEdges().size() == 0);
340 SimplifiedVoronoi<T, adjust_splines> ret(graph);
350 return SimplifiedVoronoi<T, adjust_splines>(graph);
356 Kopf2011::_disconnect_neighbors_with_dissimilar_colors(PixelGraph &graph)
359 for ( PixelGraph::iterator it = graph.begin(), end = graph.end() ; it != end
362 it->adj.top = similar_colors(it->rgba, (it - graph.width())->rgba);
365 = similar_colors(it->rgba, (it - graph.width() + 1)->rgba);
371 = similar_colors(it->rgba, (it + graph.width() + 1)->rgba);
375 = similar_colors(it->rgba, (it + graph.width())->rgba);
379 = similar_colors(it->rgba, (it + graph.width() - 1)->rgba);
385 (it - graph.width() - 1)->rgba);
434 void Kopf2011::_remove_crossing_edges_unsafe(PixelGraph &graph, T &edges,
451 weights[i].first += Heuristics::curves(graph, a, d)
453 weights[i].second += Heuristics::curves(graph, b, c)
469 sparse_pixels(graph, options.sparsePixelsRadius);
506 inline int Heuristics::curves(const PixelGraph &graph,
512 ToIter<PixelGraph::Node> to_iter(graph.begin());
532 * guintptr(to_ptr(graph.nodeTop(it))))
534 * guintptr(to_ptr(graph.nodeTopRight(it))))
536 * guintptr(to_ptr(graph.nodeRight(it))))
538 * guintptr(to_ptr(graph.nodeBottomRight(it))))
540 * guintptr(to_ptr(graph.nodeBottom(it))))
542 * guintptr(to_ptr(graph.nodeBottomLeft(it))))
544 * guintptr(to_ptr(graph.nodeLeft(it))))
546 * guintptr(to_ptr(graph.nodeTopLeft(it))))
562 inline void Heuristics::SparsePixels::operator ()(const PixelGraph &graph,
565 if ( !graph.width() || !graph.height() )
577 unsigned x = graph.toX(diagonals[MAIN_DIAGONAL].first.first);
578 unsigned y = graph.toY(diagonals[MAIN_DIAGONAL].first.first);
592 if ( x + displace >= unsigned(graph.width()) ) {
593 displace = unsigned(graph.width()) - x - 1;
597 if ( y + displace >= unsigned(graph.height()) ) {
598 displace = unsigned(graph.height()) - y - 1;
610 it = graph.nodeTopLeft(it);
620 it = (invert ? graph.nodeLeft(it) : graph.nodeRight(it));
622 it = (invert ? graph.nodeRight(it) : graph.nodeLeft(it));
626 it = graph.nodeBottom(it);