gmsh-TingyuanDoc
0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
|
Go to the documentation of this file.
24 const double t =
dot(n, q - p1) /
dot(n, p2 - p1);
25 result = p1 * (1. - t) + p2 * t;
36 const double t =
dot(q - p1, p21) /
dot(p21, p21);
37 result = p1 * (1. - t) + p2 * t;
44 const double t =
projection(p1, p2, q, result);
45 if(t >= 0.0 && t <= 1.0)
return result;
53 double closestDistance = 1.e22;
54 for(std::size_t i = 1; i < P.size(); i++) {
57 if(pq < closestDistance) {
62 return closestDistance;
68 const std::vector<SPoint3> &Q,
SPoint3 &p1,
74 for(std::size_t i = 0; i < P.size(); i++) {
84 std::vector<SPoint3> intersections;
85 for(std::size_t i = 1; i < Q.size() - 1; i++) {
93 if(bissector.
norm == 0) {
102 for(std::size_t i = 1; i < P.size(); i++) {
104 const double t =
intersect(b, n, P[i - 1], P[i], result);
105 if(t >= 0 && t <= 1) intersections.push_back(result);
109 for(std::size_t i = 0; i < intersections.size(); i++) {
122 const std::vector<SPoint3> &Q)
SVector3 crossprod(const SVector3 &a, const SVector3 &b)
double dot(const SVector3 &a, const SMetric3 &m, const SVector3 &b)
static double c(int i, int j, fullMatrix< double > &CA, const std::vector< SPoint3 > &P, const std::vector< SPoint3 > &Q)
static double projection(SPoint3 &p1, SPoint3 &p2, SPoint3 &q, SPoint3 &result)
double oneSidedHausdorffDistance(const std::vector< SPoint3 > &P, const std::vector< SPoint3 > &Q, SPoint3 &p1, SPoint3 &p2)
double distance(const SPoint3 &p) const
static double intersect(SPoint3 &q, SVector3 &n, SPoint3 &p1, SPoint3 &p2, SPoint3 &result)
double hausdorffDistance(const std::vector< SPoint3 > &P, const std::vector< SPoint3 > &Q)
static SPoint3 closestPoint(SPoint3 &p1, SPoint3 &p2, SPoint3 &q)