StackGenVis: Alignment of Data, Algorithms, and Models for Stacking Ensemble Learning Using Performance Metrics
https://doi.org/10.1109/TVCG.2020.3030352
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
514 B
30 lines
514 B
'use strict'
|
|
|
|
module.exports = invert
|
|
|
|
var invert2 = require('gl-mat2/invert')
|
|
var invert3 = require('gl-mat3/invert')
|
|
var invert4 = require('gl-mat4/invert')
|
|
|
|
function invert(out, M) {
|
|
switch(M.length) {
|
|
case 0:
|
|
break
|
|
case 1:
|
|
out[0] = 1.0 / M[0]
|
|
break
|
|
case 4:
|
|
invert2(out, M)
|
|
break
|
|
case 9:
|
|
invert3(out, M)
|
|
break
|
|
case 16:
|
|
invert4(out, M)
|
|
break
|
|
default:
|
|
throw new Error('currently supports matrices up to 4x4')
|
|
break
|
|
}
|
|
return out
|
|
} |