Giter Site home page Giter Site logo

abstracttrees.jl's Introduction

AbstractTrees

Build Status

This package provides several utilities for working with tree-like data structures. Most importantly, it defines the children method that any package that contains such a datastructure may import and extend in order to take advantage of any generic tree algorithm in this package (or other packages compatible with this package).

API overview

  • print_tree pretty prints an arbitrary tree data structure.
  • Tree is a simple wrapper around an arbitrary object that allows tree-indexing into that object (i.e. indexing with collections of indices specifying the child index at every level)
  • ShadowTree is a tree object that combines two trees of equal structure into a single tree (indexing always produces another ShadowTree, but setindex! with tuples is allowed). Useful for adding annotation nodes to other trees without modifying that tree structure itself.
  • Leaves is an iterator to visit the leaves of a tree in order.
  • PostOrderDFS is a DFS (i.e. will vist node's children before it's lexicographically following siblings) that guarantees to visit children before their parents.
  • PreOrderDFS is same as PostOrderDFS but visits parents before their children.
  • StatelessBFS iterates over a tree level-by-level, but does not keep state (causing this to be O(n^2), but be able to handle changing trees).
  • treemap maps each node of a tree to obtain a new tree.
  • treemap! maps each node of a tree in place.

abstracttrees.jl's People

Contributors

ericforgy avatar ericphanson avatar femtocleaner[bot] avatar habemus-papadum avatar jeffbezanson avatar keno avatar pallharaldsson avatar porterjamesj avatar scls19fr avatar stefankarpinski avatar yuyichao avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.