We need an outdegree() method that returns the degree without expanding the compression data of a node.
In WebGraph, this is obtained by keeping a reader that is reused by the method. The result is that the structure is not thread safe and the whole LightweightPrototype mechanism. Thanks to the len() method for the successors() iterator I think we can turn page and keep the readers thread safe (and Send/Sync in Rust). The outdegree() method can clone a reader—it will be a bit heavy for the purpose, but outdegree() will be rarely used, if ever (and we can document this).
We need an outdegree() method that returns the degree without expanding the compression data of a node.
In WebGraph, this is obtained by keeping a reader that is reused by the method. The result is that the structure is not thread safe and the whole LightweightPrototype mechanism. Thanks to the len() method for the successors() iterator I think we can turn page and keep the readers thread safe (and Send/Sync in Rust). The outdegree() method can clone a reader—it will be a bit heavy for the purpose, but outdegree() will be rarely used, if ever (and we can document this).