chase0213 / fast_tree Goto Github PK
View Code? Open in Web Editor NEWFast and Intuitive tree structure using nested sets model.
License: MIT License
Fast and Intuitive tree structure using nested sets model.
License: MIT License
using CircleCI
feature request
subtree can be treated by block, providing nodes in breadth first search (bfs) order.
root = MODEL.find_root
root.subtree.bfs.each do |node|
# do something
end
feature request
subtree can be treated by block, providing nodes in depth first search (dfs) order.
root = MODEL.find_root
root.subtree.dfs.each do |node|
# do something
end
bug
add_parent
and create_parent
should create a parent, and the parent include only given children.
A parent created by this method includes nodes which are not given as an argument:
so far, the area is calculated by the following codes:
left = children.max {|c| c.l_ptr}.l_ptr
right = children.min {|c| c.r_ptr}.r_ptr
A has B, C and D as children (,and they are stored in this order in DB).
When B and D will have a new parent E, E can't help including C due to the current implementation.
any
no
feature request
The following boolean methods are available:
root?
leaf?
has_children?
feature request
To get direct parent and children by:
@node.parent
# => parent node of @node
@node.children
# => child nodes of @node as ActiveRelation
bug
after copy/move, the tree should have correct structure as tree, that is,
all the left and right pointers have unique values each.
after copy/move multi-layered subtree, the tree seems to be destroyed
FILL ME LATER
fast_tree v0.2.0
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.