euler-characteristic
Euler characteristic for simplicial complexes
npm install euler-characteristic
Want to see pretty graphs? Log in now!
2 | downloads in the last week |
9 | downloads in the last month |
Last Published By | |
---|---|
Version | 0.0.0 last updated a year ago |
License | MIT |
Keywords | topology, euler, characteristic, homology, cohomology, betti, number, invariant, mesh, simplicial, complex, triangle, mesh, graph, tetrahedra, vertex, edge, homotopy |
Repository | git://github.com/mikolalysenko/euler-characteristic.git (git) |
Dependencies | simplicial-complex |
Dependents | mikolalysenko-hoarders |
euler-characteristic
Computes the Euler characteristic of a simplicial complex, ignoring duplicate cells.
Install
npm install euler-characteristic
Example
var euler = require("euler-characteristic")
//Compute Euler characteristic of circle
console.log(euler([[0,1], [1,2], [2,0]])) //Prints: 0
//Compute Euler characteristic of Stanford bunny
console.log(euler(require("bunny"))) //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