Comments (3)
I agree, I ran into this issue recently. I wanted to count the number of nodes in the arena and there doesn't seem to be a node-agnostic way of doing do. I expected to be able to do arena.iter().count()
. Maybe iterating over the tree in some unspecified internal order isn't commonly useful, so having a len method on arena would at the very least be useful to my particular scenario.
from indextree.
Alrighty, does #4 solve the problem for the certain use case?
from indextree.
For me, totally! Thanks!
from indextree.
Related Issues (20)
- support no_std HOT 1
- Panic on semantic error, rather than returning error? HOT 3
- Prepend to the node with no children HOT 2
- Should insertions return `Result` type? HOT 4
- Problems around CI stuff HOT 2
- feature request: `remove_children` and `detach_children` HOT 5
- Clarify order of Descendants, Traverse, and ReverseTraverse HOT 2
- Easier access to underlying index HOT 4
- Iterate over Arena in Depth-first order HOT 4
- NodeId::remove_subtree does not remove the whole subtree sometimes HOT 1
- Iteratation through children first HOT 8
- Iterating over all nodes while modifying them HOT 1
- Suggestion: Panic when appending to node that has `self` node as child.
- Appending to tree in parallel HOT 1
- Add Arena::with_capacity HOT 1
- pretty print indextree HOT 1
- bug: `NodeStamp` does not work as expected when reusing nodes
- How to get a node based on NodeId's private index1: NonZeroUsize? HOT 1
- allow getting node using usize as an index.
- Why doesn't arena have a way to iterate over nodeids?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from indextree.