-
Notifications
You must be signed in to change notification settings - Fork 0
/
PosConstraints.m
33 lines (28 loc) · 1.03 KB
/
PosConstraints.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
% Code implementing the paper "Injective and Bounded Mappings in 3D".
% Disclaimer: The code is provided as-is and without any guarantees. Please contact the author to report any bugs.
% Written by Noam Aigerman, http://www.wisdom.weizmann.ac.il/~noamaig/
classdef PosConstraints<handle
%matrix representing the positional constraints.
properties
M;%matrix
b;%rhs
ANCHORS=[];
ANCHOR_COORDS=[];
STATIC_ANCHORS;
end
methods
function obj= PosConstraints(anchors,anchor_coords,td,sol_length,POS)
obj.ANCHORS=anchors;
obj.ANCHOR_COORDS=anchor_coords;
[obj.M,obj.b] = create_positional_constraints( anchors,anchor_coords,td,sol_length);
if isempty(anchors)
static_anchors=[];
else
adiff=POS(anchors,:)-anchor_coords;
adist=sum(adiff.^2,2);
static_anchors=adist<1e-10;
end
obj.STATIC_ANCHORS=static_anchors;
end
end
end