Skip to content

About

A piecewise function factory

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

piecewise-function

A piecewise function factory.

The first argument is the x values and the second the y values. It will project out of bound values on the first/last piece.

var Piecewise = require('piecewise-function')

relu = Piecewise([-1, 0, 1], [0, 0, 1])
relu(-1.5)  // 0
relu(-0.5)  // 0
relu(0.5)   // 0.5
relu(1.5)   // 1.5

About

A piecewise function factory

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages