Esempio n. 1
0
 /**
  * @param EquationInterface $equation
  * @param MatrixInterface   $check
  * @return bool
  */
 public function isRoot(EquationInterface $equation, MatrixInterface $check)
 {
     return $this->operator->multiply($equation->getCoefficients(), $check)->toArray() === $equation->getConstants()->toArray();
 }
 /**
  * @param EquationInterface $equation
  * @return MatrixInterface
  */
 public function solve(EquationInterface $equation)
 {
     return $this->operator->multiply($this->operator->invert($equation->getCoefficients()), $equation->getConstants());
 }