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.
StackGenVis/frontend/node_modules/gl-mat3/transpose.js

35 lines
680 B

4 years ago
module.exports = transpose
/**
* Transpose the values of a mat3
*
* @alias mat3.transpose
* @param {mat3} out the receiving matrix
* @param {mat3} a the source matrix
* @returns {mat3} out
*/
function transpose(out, a) {
// If we are transposing ourselves we can skip a few steps but have to cache some values
if (out === a) {
var a01 = a[1], a02 = a[2], a12 = a[5]
out[1] = a[3]
out[2] = a[6]
out[3] = a01
out[5] = a[7]
out[6] = a02
out[7] = a12
} else {
out[0] = a[0]
out[1] = a[3]
out[2] = a[6]
out[3] = a[1]
out[4] = a[4]
out[5] = a[7]
out[6] = a[2]
out[7] = a[5]
out[8] = a[8]
}
return out
}