Git Product home page Git Product logo

ndarray-prefix-sum's Introduction

ndarray-prefix-sum

Computes a prefix sum of an array, or in higher dimensions the summed area table of an image. Works both in node.js and in the browser. Built on top of ndarray.

Example

var ndarray = require("ndarray")
var prefixSum = require("ndarray-prefix-sum")

var x = ndarray(new Float32Array([1, 2, 3, 4, 5, 6]))

prefixSum(x)

for(var i=0; i<x.shape[0]; ++i) {
  console.log(x.get(i))
}

Install

npm install ndarray-prefix-sum

API

require("ndarray-prefix-sum")(array)

Computes the prefix sum of array in place.

  • array is an ndarray

Returns array

##Credits (c) 2013 Mikola Lysenko. MIT License

ndarray-prefix-sum's People

Contributors

mikolalysenko avatar

Stargazers

Philipp Burckhardt avatar Ricky Reusser avatar Michael Anthony avatar Athan avatar

Watchers

 avatar Dmitry Iv. avatar James Cloos avatar Michael Anthony avatar Athan avatar  avatar

Forkers

domoritz

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.