euler-characteristic
Computes the Euler characteristic of a simplicial complex, ignoring duplicate cells.
Install
npm install euler-characteristic
Example
var euler = //Compute Euler characteristic of circleconsole //Prints: 0 //Compute Euler characteristic of Stanford bunnyconsole //Prints: 2 //(the bunny is homotopic to a sphere after all)
require("euler-characteristic")(cells)
Computes the Euler characteristic of a simplicial complex, ignoring any duplicate cells.
cells
is a simplicial complex
Returns An integer representing the Euler characteristic of the cell complex
Credits
(c) 2013 Mikola Lysenko. MIT License