src/Px.php
public function index($indices)
    {
        $this->assertIndexMultipliers();

        $index = 0;
        for ($i = 0, $length = count($this->indexMultipliers); $i < $length; ++$i) {
            $index += $indices[$i] * $this->indexMultipliers[$i];
        }

        return $index;
    }
public function index($indices)
    {
        $this->assertIndexMultipliers();

        $index = 0;
        for ($i = 0, $length = count($this->indexMultipliers); $i < $length; ++$i) {
            $index += $indices[$i] * $this->indexMultipliers[$i];
        }

        return $index;
    }
public function index ( $ indices ) { $ this -> assertIndexMultipliers ( ) ; $ index = 0 ; for ( $ i = 0 , $ length = count ( $ this -> indexMultipliers ) ; $ i < $ length ; ++ $ i ) { $ index += $ indices [ $ i ] * $ this -> indexMultipliers [ $ i ] ; } return $ index ; }
Computes the index within the data matrix.

@param array $indices An array of all value indices

@return int
Computes the index within the data matrix .