Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Conor Joseph Mccoid
UNIGE
Commits
16c4ed76
Commit
16c4ed76
authored
Dec 27, 2021
by
Conor McCoid
Browse files
Tetra: initialized Z in higher dim algo, loose bounds on size
parent
ebcfab25
Changes
2
Show whitespace changes
Inline
Side-by-side
Research/Edge Intersection/Tetrahedra/Higher dimensions/ALGO_simplices_IntersectSimplices_v1_20211216.m
View file @
16c4ed76
...
...
@@ -36,12 +36,12 @@ if prod(sum(S,2))==0 % if there is a given coordinate where all X values are n
Z
=
[];
return
end
S
=
prod
(
S
);
Z
=
U
(:,
S
==
1
);
S
=
prod
(
S
);
m
=
sum
(
S
==
1
);
Z
=
U
(:,
S
==
1
);
%--Intersections--%
global
D
D
=
zeros
(
2
^
n
,
2
^
(
n
+
1
));
% storage for determinants
Z
=
[
Z
,
zeros
(
n
-
1
,
2
^
n
*
n
)];
% is this the actual number of possible intersections? surely we can prove a tighter bound
H
=
cell
(
1
);
J
=
H
;
T
=
H
;
H
{
1
}
=
X
;
J
{
1
}
=
eye
(
n
);
T
{
1
}
=
zeros
(
n
,
1
);
for
i
=
1
:
n
-
2
...
...
@@ -50,19 +50,21 @@ for i=1:n-2
return
end
for
j
=
1
:
length
(
T
)
% given this unpacking it is probably more efficient to do this step within the subfunctions
Hj
=
H
{
j
};
S
=
prod
(
Hj
>=
0
);
Z
=
[
Z
,
A
*
Hj
(
2
:
end
,
S
==
1
)
+
v0
];
H1
=
H
{
j
};
S
=
prod
(
H1
>=
0
);
mj
=
sum
(
S
==
1
);
Z
(:,
m
+
(
1
:
mj
))
=
A
*
H1
(
2
:
end
,
S
==
1
)
+
v0
;
m
=
m
+
mj
;
if
sum
(
S
)
~=
0
% check which hyperplanes of V intersect with edges of U
ind
=
1
:
n
;
ind
=
ind
(
T
{
j
}
==
1
)
-
1
;
ind
(
ind
==
0
)
=
n
;
nhbrs
(
ind
)
=
1
;
end
end
end
Z
=
Z
(:,
1
:
m
);
%--Vertices of Y in X--%
binV
=
zeros
(
n
,
1
);
indV
=
binV
;
% another probably terrible way of doing things... see notes on v1 of Unfold and v2 of Orphan for thoughts
while
~
isempty
(
H
)
H1
=
H
{
1
};
T1
=
T
{
1
};
indT
=
1
:
n
;
indT
=
indT
(
T1
==
0
);
% at most two values in ind
indT
=
1
:
n
;
indT
=
indT
(
T1
==
0
);
% at most two values in ind
T
for
i
=
indT
if
indV
(
i
)
==
0
j
=
indT
(
indT
~=
i
);
...
...
Research/Edge Intersection/Tetrahedra/Higher dimensions/SUB_simplices_Orphan_v2_20211214.m
View file @
16c4ed76
function
[
H_new
,
J_new
,
T_new
]
=
SUB_simplices_Orphan_v2_20211214
(
H
,
J
,
T
,
y
)
function
[
H_new
,
J_new
,
T_new
,
m_new
]
=
SUB_simplices_Orphan_v2_20211214
(
H
,
J
,
T
,
y
)
% ORPHAN determines adjacent intersections and generates index set
% [H_new,J_new,T_new] = Orphan(H,J,T,A,y,X) finds all intersections
% H_new between the n-simplex X and the hyperplanes indexed by T and y.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment