g = model.space.graph
weight_matrix = LightGraphs.weights(g)
for i in1:nv(g)
weight_matrix[i,i] =0end
edgewidthsdict =Dict()
for node in1:nv(g)
nbs =neighbors(g,node)
for nb in nbs
edgewidthsdict[(node,nb)] = weight_matrix[node,nb] /sum([outneighbor for outneighbor in weight_matrix[node,:]])
endendedgewidthsf(s,d,w) = edgewidthsdict[(s,d)]*5
plotargs =
We should be able to attach names to rules, so that normalization steps (and error messages?) can be better understood by users. For example:
normalize(@term(diff(x + y, x)))
- @term(diff(x,x) + diff(y,x)) by sum rule in differentiation
- @term(one(x) + diff(y, x)) by linear rule of differentiation
- @term(1 + diff(y, x)) by multiplicative identity of a number
- @term(1 + zero(x))