forked from luetge/flagser
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathalgorithms.math
More file actions
26 lines (16 loc) · 733 Bytes
/
algorithms.math
File metadata and controls
26 lines (16 loc) · 733 Bytes
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
dimension overrideVertices overrideEdges = dimension
zero overrideVertices overrideEdges = 0
max = max(faceWeights)
max3 = max(faceWeights)
max_plus_one = max(faceWeights) + 1
product = product(faceWeights)
sum = sum(faceWeights)
pmean = max(faceWeights) + sum(faceWeights, x -> x^2)^(1/2) / (dimension + 1)
pmoment = max(faceWeights) + sum(faceWeights, x -> (x - sum(faceWeights)/(dimension + 1))^2)^(1/2) / (dimension + 1)
remove_edges = cases:
dim 0: 0
dim 1: error "Please provide a graph with random weights on the edges."
else: max(faceWeights)
vertex_degree overrideVertices overrideEdges = cases:
dim 0: -1 * (vertexOutDegrees[cellVertices[0]] + vertexInDegrees[cellVertices[0]])
else: max(faceWeights)