33#ifdef OGDF_INCLUDE_CGAL
43template<
typename Kernel>
45 unsigned int crossings = 0;
46 for (
unsigned int i = 0; i + 1 <
segments.size(); ++i) {
47 for (
unsigned int j = i + 1;
j <
segments.size(); ++
j) {
55template<
typename Kernel,
typename Graph>
57 std::vector<LineSegment_t<Kernel>>
segments;
59 for (
auto e :
drawing.get_graph().edges()) {
65template<
typename Kernel,
typename Graph>
66int count_crossings(graph::GeometricDrawing<Kernel, Graph>&
d,
typename Graph::Node& v) {
68 for (
auto f :
d.get_graph().edges()) {
69 for (
auto e :
d.get_graph().edges(v)) {
70 cr += (
f != e) && geometry::do_intersect_open(
d.get_segment(e),
d.get_segment(
f));
76template<
typename Kernel,
typename Graph>
78 const typename Graph::Node& v) {
79 std::vector<int>
cr(v->degree(), 0);
81 for (
auto f :
d.get_graph().edges()) {
83 for (
auto e :
d.get_graph().edges(v)) {
84 cr[i] += (
f != e) && geometry::do_intersect_open(
d.get_segment(e),
d.get_segment(
f));
91template<
typename Kernel,
typename Graph>
94 auto& g =
d.get_graph();
96 for (
auto f : g.edges()) {
98 for (
auto e : g.edges(v)) {
100 && geometry::do_intersect_open(
d.get_segment(e),
d.get_segment(
f))) {
109template<
typename Kernel,
typename Graph>
110int count_crossings(graph::GeometricDrawing<Kernel, Graph>&
d,
typename Graph::Edge& e) {
112 for (
auto f :
d.get_graph().edges()) {
113 cr += (
f != e) && (
f->commonNode(e) ==
nullptr)
114 && geometry::do_intersect_open(
d.get_segment(e),
d.get_segment(
f));
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.