Skip to content
#

julialang

Here are 287 public repositories matching this topic...

pitmonticone
pitmonticone commented Sep 12, 2020
g = model.space.graph

weight_matrix = LightGraphs.weights(g)
for i in 1:nv(g)
	weight_matrix[i,i] = 0
end

edgewidthsdict = Dict()
for node in 1: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,:]])
	end
end

edgewidthsf(s,d,w) = edgewidthsdict[(s,d)]*5

plotargs =
HarrisonGrodin
HarrisonGrodin commented Aug 14, 2018

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)) 

Improve this page

Add a description, image, and links to the julialang topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the julialang topic, visit your repo's landing page and select "manage topics."

Learn more