protected function setUp()
 {
     $this->object = new stubTraitAssertMatrixIsRational();
     $this->mRational = MatrixFactory::createRational([[[1, 1], '2/3', 3.786]]);
     $this->mNumeric = MatrixFactory::createNumeric([[1]]);
     $this->mComplex = MatrixFactory::createComplex([['1+2i', '14-4i', '4-3i']]);
 }
Exemplo n.º 2
0
 public function testComplexNumberNonIdentityMatrixIsRecognised()
 {
     //        $test1 = [['0+0i','0+0i','0+0i'],['0+0i','1+0i','0+0i'],['0+0i','0+0i','1+0i']];
     //        $mA = MatrixFactory::createComplex($test1);
     //        $this->assertFalse($this->object->is($mA));
     $test2 = [['0+3i', '0+0i', '0+0i'], ['0+0i', '1+0i', '0+0i'], ['0+0i', '0+0i', '1+0i']];
     $mA = MatrixFactory::createComplex($test2);
     $this->assertFalse($this->object->is($mA));
 }
Exemplo n.º 3
0
 /**
  * @dataProvider invalidEntries
  * @expectedException Chippyash\Math\Matrix\Exceptions\MathMatrixException
  * @expectedExceptionMessage Invalid item type for Complex Matrix
  */
 public function testCreateComplexMatrixWithInvalidEntriesThrowsException($data)
 {
     MatrixFactory::createComplex($data);
 }