mathjs/lib/function/algebra/sparse/sparse_flip.js
Rogelio J. Baucells 9ab61740e7 sparse algorithms
2015-04-22 23:15:04 -04:00

23 lines
394 B
JavaScript

'use strict';
function factory () {
/**
* Flips the value
*
* @param {Number} i The value to flip
*
* Reference: http://faculty.cse.tamu.edu/davis/publications.html
*/
var sparse_flip = function (i) {
// flip the value
return -i - 2;
};
return sparse_flip;
}
exports.name = 'sparse_flip';
exports.path = 'sparse';
exports.factory = factory;