Skip to content

Commit 19840f8

Browse files
committed
choose model and params from command line
1 parent b3a888d commit 19840f8

File tree

5 files changed

+73420
-14
lines changed

5 files changed

+73420
-14
lines changed

anchors.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ list <int> explore_boundary(HalfedgeDS he, int v, int r, MatrixXi R) {
3535
}
3636

3737

38-
int add_anchors_on_edge(HalfedgeDS he, int anchor, int r, MatrixXi R, MatrixXd V, VectorXi& anchors, MatrixXd Proxies) {
38+
int add_anchors_on_edge(HalfedgeDS he, int anchor, int r, MatrixXi R, MatrixXd V, VectorXi& anchors, MatrixXd Proxies, double treshold) {
3939
// modifies anchors to add anchors on edge
4040
int k = 0; //number of new anchors
4141

@@ -70,7 +70,7 @@ int add_anchors_on_edge(HalfedgeDS he, int anchor, int r, MatrixXi R, MatrixXd V
7070
max_v = new_v;
7171
}
7272
}
73-
if (max_d>0.4) { // treshold
73+
if (max_d>treshold) { // treshold
7474
anchors(max_v) = 1;
7575
k++;
7676
}
@@ -117,7 +117,7 @@ vector<int> find_vertex_proxies(HalfedgeDS he, int v, MatrixXi R) {
117117
}
118118

119119

120-
vector<vector<int>> anchor_points(HalfedgeDS he, MatrixXi R, MatrixXd V, MatrixXd Proxies) {
120+
vector<vector<int>> anchor_points(HalfedgeDS he, MatrixXi R, MatrixXd V, MatrixXd Proxies, double treshold) {
121121
int n = V.rows();
122122
int p = Proxies.rows()/2;
123123
vector<vector<int>> vertex_proxies(n); //list of proxies
@@ -146,10 +146,10 @@ vector<vector<int>> anchor_points(HalfedgeDS he, MatrixXi R, MatrixXd V, MatrixX
146146
r = vertex_proxies[i][m];
147147
if (seen(r)==0) {
148148
seen(r)=1;
149-
kv = add_anchors_on_edge(he,i,r,R,V,anchors, Proxies);
149+
kv = add_anchors_on_edge(he,i,r,R,V,anchors, Proxies,treshold);
150150
while (kv>0) {
151151
k += kv;
152-
kv = add_anchors_on_edge(he,i,r,R,V,anchors, Proxies);
152+
kv = add_anchors_on_edge(he,i,r,R,V,anchors, Proxies,treshold);
153153
}
154154
}
155155
}

anchors.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010
using namespace Eigen;
1111
using namespace std;
1212

13-
vector<vector<int>> anchor_points(HalfedgeDS he, MatrixXi R, MatrixXd V, MatrixXd Proxies);
13+
vector<vector<int>> anchor_points(HalfedgeDS he, MatrixXi R, MatrixXd V, MatrixXd Proxies, double treshold);
1414
vector<int> find_vertex_proxies(HalfedgeDS he, int v, MatrixXi R);

0 commit comments

Comments
 (0)