cii-text-analysis/vendor/rubix/tensor/benchmarks/Structural/InsertMatrixBench.php

40 lines
619 B
PHP
Raw Permalink Normal View History

2026-02-10 16:19:59 +01:00
<?php
namespace Tensor\Benchmarks\Structural;
use Tensor\Matrix;
/**
* @Groups({"Structural"})
* @BeforeMethods({"setUp"})
*/
class InsertMatrixBench
{
/**
* @var \Tensor\Matrix
*/
protected $a;
/**
* @var \Tensor\Matrix
*/
protected $b;
public function setUp() : void
{
$this->a = Matrix::uniform(500, 500);
$this->b = Matrix::uniform(100, 100);
}
/**
* @Subject
* @Iterations(5)
* @OutputTimeUnit("seconds", precision=3)
*/
public function insert() : void
{
$this->a->insert($this->b, 50, 100);
}
}