Coder Social home page Coder Social logo

shiftnanigans's Introduction

Shiftnanigans

This crate contains useful, generic, commonly needed functionality, data structures, and algorithms for iterating sequentially forward and backward via "shifting". These "shifters" allow for controlled traversal of tree-like data structures in a manner that permits easier detection of fast-failing scenarios, rather than checking collections of items.

Features

Shifters

  • SegmentPermutationShifter
    • Transforms unpositioned line segments into localized line segments
  • IndexShifter
    • Traverses a tree-like structure of items, indexing over them
  • ScalingSquareBreadthFirstSearchShifter
    • Progressively shifts over all possible depths of the internal tree of integers, only permitting reaching deeper children after first iterating over all permutations of children closer to the root in a square-like pattern
  • ShiftingSquareBreadthFirstSearchShifter
    • Similar to the ScalingSquareBreadthFirstSearchShifter, but the integers are now the items at the respective index
  • HyperGraphClicheShifter
    • Returns the fully connected cliche graphs as they exist in the provided hypergraph, but each stateful node is provided singularly as the shifter is traversed over

Incrementers

  • BinaryDensityIncrementer
    • Returns a collection of boolean values such that each subsequent iteration increases the total number of ones progressively starting from having zero true values to having all true values
  • BinaryValueIncrementer
    • Returns the binary representation of all integers from zero to the provided maximum power of two based on the provided length
  • LimitedIncrementer
    • A wrapper over another incrementer, only permitting a certain number of iterations as provided to the constructor
  • RoundRobinIncrementer
    • A wrapper over other incrementers that traverses around to each incrementer internally, giving each a chance to return a sequence of items
  • ShifterIncrementer
    • A wrapper over a shifter that traverses iteratively in a depth-first search pattern
  • ShiftingCellGroupDependencyIncrementer
    • A rather complex incrementer that compares groups of cell (pixels) to each other, disallowing overlaps (specific and general), and ensuring adjacency between non-wall cell groups and wall cell groups

PixelBoard

  • PixelBoardRandomizer
    • When provided a PixelBoard, it randomizes where the pixels (cell groups) are located while avoiding overlap and maintaining adjacency between detected cell groups

Usage

Coming soon

Examples

None (at the moment)

shiftnanigans's People

Contributors

austinhellerrepo avatar zicklag avatar

Stargazers

Moritz Mœller avatar Thomas Versteeg avatar kemperrrrr avatar Willi Kappler avatar Marius Ungureanu avatar Nikita avatar  avatar Erlend Sogge Heggen avatar

Watchers

 avatar

Forkers

zicklag

shiftnanigans's Issues

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.