{"size": 708, "ext": "js", "max_stars_repo_path": "src/functions/matrix/adjoint.js", "max_stars_repo_name": "onenylxus/lime", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/functions/matrix/adjoint.js", "max_issues_repo_name": "onenylxus/lime", "max_issues_repo_issues_event_min_datetime": "2021-09-24T17:36:12.000Z", "max_issues_repo_issues_event_max_datetime": "2021-09-24T17:36:12.000Z", "max_forks_repo_path": "src/functions/matrix/adjoint.js", "max_forks_repo_name": "onenylxus/lime", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 1, "max_forks_count": null, "avg_line_length": 24.4137931034, "max_line_length": 97, "alphanum_fraction": 0.5098870056}
// Require
const LimeFunction = require('../../structs/function');

/* ------------------------ division ------------------------ */

// Adjoint function class
class LimeFunctionAdjoint extends LimeFunction {
  // Constructor
  constructor(lime, mode) {
    // Super from function class
    super(lime, { name: 'adjoint', mode });

    // Operations
    this.operations.r = [
      'er(arg{mat[1]})',
    ];

    // Algorithms
    this.algorithms.set('r(arg{mat[1]})', (step) => {
      step.rus(this.lime.direct(['transpose', '(', 'cof', '(', step.right.places[0], ')', ')']));
    });
  }
}

/* ------------------------ division ------------------------ */

// Export
module.exports = LimeFunctionAdjoint;
