In preparation for the incremental monte carlo algorithm, we would need a better model to work with a Graph. Currently we have this slightly artificial Normalised newtype wrapper which witnesses the fact we import the graph using an adjacency matrix and, as such, we normalise all the edges beforehand, and the final graph is created with a single outgoing edge for each pair of nodes (N1,N2).
Such representation is also problematic when it comes to #83, because the trustRank phase happens inside the GraphAlgorithm::execute and as such we cannot mutate the input Graph. This means we need to be able to calculate the weight for each edge dynamically as the graph evolves. In order to do so, at the very minimum we would need to store somewhere the total contributions for an account and on the edges the number of contributions (if any).
Another alternative would be to store everything in some kind of hashmap, and leave the EdgeData alone. More design & thinking is required.
In preparation for the incremental monte carlo algorithm, we would need a better model to work with a Graph. Currently we have this slightly artificial
Normalised
newtype wrapper which witnesses the fact we import the graph using an adjacency matrix and, as such, we normalise all the edges beforehand, and the final graph is created with a single outgoing edge for each pair of nodes(N1,N2)
.Such representation is also problematic when it comes to #83, because the trustRank phase happens inside the
GraphAlgorithm::execute
and as such we cannot mutate the inputGraph
. This means we need to be able to calculate the weight for each edge dynamically as the graph evolves. In order to do so, at the very minimum we would need to store somewhere the total contributions for an account and on the edges the number of contributions (if any).Another alternative would be to store everything in some kind of hashmap, and leave the
EdgeData
alone. More design & thinking is required.