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.
27 lines
681 B
27 lines
681 B
module.exports = adjoint
|
|
|
|
/**
|
|
* Calculates the adjugate of a mat3
|
|
*
|
|
* @alias mat3.adjoint
|
|
* @param {mat3} out the receiving matrix
|
|
* @param {mat3} a the source matrix
|
|
* @returns {mat3} out
|
|
*/
|
|
function adjoint(out, a) {
|
|
var a00 = a[0], a01 = a[1], a02 = a[2]
|
|
var a10 = a[3], a11 = a[4], a12 = a[5]
|
|
var a20 = a[6], a21 = a[7], a22 = a[8]
|
|
|
|
out[0] = (a11 * a22 - a12 * a21)
|
|
out[1] = (a02 * a21 - a01 * a22)
|
|
out[2] = (a01 * a12 - a02 * a11)
|
|
out[3] = (a12 * a20 - a10 * a22)
|
|
out[4] = (a00 * a22 - a02 * a20)
|
|
out[5] = (a02 * a10 - a00 * a12)
|
|
out[6] = (a10 * a21 - a11 * a20)
|
|
out[7] = (a01 * a20 - a00 * a21)
|
|
out[8] = (a00 * a11 - a01 * a10)
|
|
|
|
return out
|
|
}
|
|
|