coordinates_generator
|
#include <cmath>
#include <memory>
#include <iterator>
#include <iostream>
#include <vector>
#include <list>
#include <algorithm>
#include <set>
#include <unordered_map>
#include <fstream>
#include <string>
#include "triangulation.hpp"
#include <queue>
#include <unordered_set>
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/polygon.hpp>
#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
#include <boost/geometry/algorithms/assign.hpp>
Go to the source code of this file.
Classes | |
struct | Vertex |
Class to store vertex, containing information about edge to_ going into it More... | |
struct | Face |
Structure to store a face containing about one edge incident to it More... | |
struct | Edge |
Structure to store the edge containing information about next_ , prev_ , opposite_ edges and vertices and face incident to it. More... | |
struct | graph |
Main class to store all the information about graph, edges, vertices, ... More... | |
struct | fingerprints |
Structure for generating all fingerprints iteratively. More... | |
Macros | |
#define | M_PI 3.14159265358979323846 |
#define | INF 100000000 |
#define | EPSILON 0.0001 |
#define | x first |
#define | y second |
Typedefs | |
using | array_4D = vector< vector< vector< vector< bool > > > > |
Functions | |
bool | if_two_segmetns_intersects (pair< shared_ptr< Vertex >, shared_ptr< Vertex > > line1, pair< shared_ptr< Vertex >, shared_ptr< Vertex > > line2) |
Function to detect whether line1 and line2 intersect. More... | |
void | create_coordinates (const vector< shared_ptr< Vertex > > &points, vector< vector< double > > &distances) |
Function to set distance Euclidian distance for all pair of points i, j in points into matrix distances . More... | |
void | dijsktra (vector< shared_ptr< Vertex > > &points, vector< vector< double > > distances, vector< int > &parent) |
Standart dijsktra algorithm returning shortest paths from vertex 0 with paths stored in vector parent . More... | |
void | print_graph (graph *g) |
vector< pair< double, double > > | create_circle (double radius, double cx, double cy, int n) |
Function to create "dummy" vertices for one vertex. More... | |
double | distance (pair< double, double > a) |
double | distance (pair< double, double > a, pair< double, double > b) |
double | distance (shared_ptr< Vertex > a, shared_ptr< Vertex > b) |
vector< pair< double, double > > | make_convex_hull (vector< pair< double, double > > vertices) |
Function to create convex hull of vertices . More... | |
bool | compare (pair< double, double > a, pair< double, double > b) |
Check whether the two pairs are "almost" the same. More... | |
double | det (pair< double, double > vec1, pair< double, double > vec2) |
Fucntion to count the determinant. More... | |
pair< double, double > | get_shift (shared_ptr< Vertex > vertex, pair< double, double > vect) |
Function to generate shift perpendicular to given vector vect in order to be able to move same vertices to distinguish them. More... | |
pair< double, double > | find_vertex_in_right_direction (shared_ptr< Vertex > vertex, pair< double, double > vect) |
Get vertex perpendicular to vect from vertex and on the right side depending on the clockwise, counterclockwise order of vertices. More... | |
double | get_value (int a, int b, int c, shared_ptr< Vertex > point) |
Get value of linear function f(x, y) = ax+by+c. More... | |
bool | is_on_right_side_of (shared_ptr< Vertex >asked_point, shared_ptr< Vertex > point, pair< double, double > vect, shared_ptr< Vertex > on_right_side) |
Function to check whether asked_point and on_right_side points are on the same side of line given by point and vector vect . More... | |
bool | are_collinear (shared_ptr< Vertex > v1, shared_ptr< Vertex > v2, shared_ptr< Vertex > v3) |
long long | factorial (int n) |
bool | are_there_ends (Edge *edge, int a, int b) |
Function to check whether the ends of edge are a and b . More... | |
Variables | |
bool | print_bool = false |
#define EPSILON 0.0001 |
#define INF 100000000 |
#define M_PI 3.14159265358979323846 |
#define x first |
#define y second |
using array_4D = vector<vector<vector<vector<bool> > > > |
|
inline |
|
inline |
Function to check whether the ends of edge
are a
and b
.
edge | |
a | |
b |
|
inline |
Check whether the two pairs are "almost" the same.
a | |
b |
|
inline |
Function to create "dummy" vertices for one vertex.
radius | |
cx | |
cy | |
n |
|
inline |
Function to set distance Euclidian distance for all pair of points i, j in points
into matrix distances
.
points | |
distances |
|
inline |
Fucntion to count the determinant.
vec1 | |
vec2 |
|
inline |
Standart dijsktra algorithm returning shortest paths from vertex 0 with paths stored in vector parent
.
points | |
distances | |
parent |
|
inline |
|
inline |
|
inline |
|
inline |
Get vertex perpendicular to vect
from vertex
and on the right side depending on the clockwise, counterclockwise order of vertices.
vertex | |
vect |
|
inline |
Function to generate shift perpendicular to given vector vect
in order to be able to move same vertices to distinguish them.
vertex | |
vect |
|
inline |
Get value of linear function f(x, y) = ax+by+c.
a | |
b | |
c | |
point |
|
inline |
Function to detect whether line1
and line2
intersect.
line1 | |
line2 |
|
inline |
Function to check whether asked_point
and on_right_side
points are on the same side of line given by point
and vector vect
.
asked_point | |
point | |
vect | |
on_right_side |
|
inline |
Function to create convex hull of vertices
.
vertices |
|
inline |
|
inline |