Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cech-complex

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cech-complex

Cech complex builder

  • 1.0.1
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Cech complex in JavaScript

Small library for building generalized Cech Complex as described in the following paper: "Construction of the generalized Cech complex" by Ngoc Khuyen Le, Philippe Martins, Laurent Decreusefond, Anais Vergne.

Generalized Cech Comples is a "good cover" where each cell has different radius (as opposed to standard Cech complex, where radius is always the same). This approach is very useful for analysing coverage of wireless networks, sensors, etc.

Installation

npm install cech-complex

or in browser

bower install cech-complex

Usage

var Cech = require('cech-complex');
var cech = new Cech();

var cells = [
  [[0, 0], 10], // [ [x, y], radius ]
  [[1, 1], 10],
  // ...
];

var simplices = cech.complex(cells);
/*
[
  [[0], [1], ... ], // 0-simplex (points)
  [[0,1], [0,5], ...], // 1-simplex (edges)
  [[0,1,5], [0,1,9], ...], // 2-simplex (triangles)
  ... // 3-simplex (tetrahedrons)
]
*/

For faster computation you can limit the number of simplices dimensions:

var simplices = cech.comples(cells, 2); // build up to 2-simplex

Test

To test, install mocha globally and run following command:

npm test

Future releases

  • computing vertices index
  • cycles and boundaries
  • betti numbers

Keywords

FAQs

Package last updated on 05 Aug 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc