nerdamer-ts
Version:
javascript light-weight symbolic math expression evaluator
17 lines • 654 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.matsetrow = void 0;
const Symbol_1 = require("../../../../Types/Symbol");
const Errors_1 = require("../../../../Core/Errors");
function matsetrow(matrix, i, x) {
//handle symbolics
if (!i.isConstant())
return (0, Symbol_1.symfunction)('matsetrow', arguments);
if (matrix.elements[i].length !== x.elements.length)
throw new Errors_1.DimensionError('Matrix row must match row dimensions!');
var M = matrix.clone();
M.elements[i] = x.clone().elements;
return M;
}
exports.matsetrow = matsetrow;
//# sourceMappingURL=matsetrow.js.map