Results of 1 - 10 of about 33 for Reduce (0.004 sec.)
- array_reduce — コールバック関数を繰り返し配列に適用し、配列をひとつの値にまとめ... 12449
- array_reduce (PHP 4 >= 4.0.5, PHP 5, PHP 7, PHP 8) array_reduce — コールバック関数を繰り返し配列に適用し、配列をひとつの値にまとめる 説明 function array_reduce ( array $array , callable $callback , mixed $initial = null ): mixed array_reduce
... 配列が空の場合の最終結果として使用されます。 戻り値 結果の値を返します。 配列が空で initial が渡されなかった場合は、 array_reduce() は null を返します。 変更履歴 バージョン 説明 8.0.0 callback がリファレンス渡しされる引数を期待している場合、 この関数は ... E_WARNING を発生させるようになりました。 例 例1 array_reduce() の例 <?php function sum ( $carry , $item ) { $carry += $item ; return $carry ; } function product ( $carry , $item ) { $ ... carry *= $item ; return $carry ; } $a = array( 1 , 2 , 3 , 4 , 5 ); $x = array(); var_dump ( array_reduce ( $a , "sum" )); // int(15) var_dump ( array_reduce ( $a , "product" , 10 )); // int(1200), because: 10*1*2*3*4*5 var_dump ...
-
https://man.mtool.work/php/8.3/function.array-reduce.html
- Ds\Deque::reduce — Reduces the deque to a single value using a callback functio... 11005
- Ds\Deque::reduce (PECL ds >= 1.0.0) Ds\Deque::reduce — Reduces the deque to a single value using a callback function 説明 public function Ds\Deque::reduce ( callable $callback , mixed $initial = ? ): mixed Reduces the deque to a single valu
... nitial The initial value of the carry value. Can be null . 戻り値 The return value of the final callback. 例 例1 Ds\Deque::reduce() with initial value example <?php $deque = new \Ds\Deque ([ 1 , 2 , 3 ]); $callback = function( $carry , $value ) { retur ... n $carry * $value ; }; var_dump ( $deque -> reduce ( $callback , 5 )); // Iterations: // // $carry = $initial = 5 // // $carry = $carry * 1 = 5 // $carry = $carry * 2 = 10 / ... / $carry = $carry * 3 = 30 ?> 上の例の出力は、 たとえば以下のようになります。 int(30) 例2 Ds\Deque::reduce() without an initial value example <?php $deque = new \Ds\Deque ([ 1 , 2 , 3 ]); var_dump ( $deque -> reduce (function( $c ...
-
https://man.mtool.work/php/8.3/ds-deque.reduce.html
- Ds\Sequence::reduce — Reduces the sequence to a single value using a callback f... 11005
- Ds\Sequence::reduce (PECL ds >= 1.0.0) Ds\Sequence::reduce — Reduces the sequence to a single value using a callback function 説明 abstract public function Ds\Sequence::reduce ( callable $callback , mixed $initial = ? ): mixed Reduces the s
... ial The initial value of the carry value. Can be null . 戻り値 The return value of the final callback. 例 例1 Ds\Sequence::reduce() with initial value example <?php $sequence = new \Ds\Vector ([ 1 , 2 , 3 ]); $callback = function( $carry , $value ) { r ... eturn $carry * $value ; }; var_dump ( $sequence -> reduce ( $callback , 5 )); // Iterations: // // $carry = $initial = 5 // // $carry = $carry * 1 = 5 // $carry = $carry * 2 = 10 / ... / $carry = $carry * 3 = 30 ?> 上の例の出力は、 たとえば以下のようになります。 int(30) 例2 Ds\Sequence::reduce() without an initial value example <?php $sequence = new \Ds\Vector ([ 1 , 2 , 3 ]); var_dump ( $sequence -> reduce (funct ...
-
https://man.mtool.work/php/8.3/ds-sequence.reduce.html
- Ds\Set::reduce — Reduces the set to a single value using a callback function | ... 11005
- Ds\Set::reduce (PECL ds >= 1.0.0) Ds\Set::reduce — Reduces the set to a single value using a callback function 説明 public function Ds\Set::reduce ( callable $callback , mixed $initial = ? ): mixed Reduces the set to a single value using a
... initial The initial value of the carry value. Can be null . 戻り値 The return value of the final callback. 例 例1 Ds\Set::reduce() with initial value example <?php $set = new \Ds\Set ([ 1 , 2 , 3 ]); $callback = function( $carry , $value ) { return $c ... arry * $value ; }; var_dump ( $set -> reduce ( $callback , 5 )); // Iterations: // // $carry = $initial = 5 // // $carry = $carry * 1 = 5 // $carry = $carry * 2 = 10 / ... / $carry = $carry * 3 = 30 ?> 上の例の出力は、 たとえば以下のようになります。 int(30) 例2 Ds\Set::reduce() without an initial value example <?php $set = new \Ds\Set ([ 1 , 2 , 3 ]); var_dump ( $set -> reduce (function( $carry , ...
-
https://man.mtool.work/php/8.3/ds-set.reduce.html
- Ds\Vector::reduce — Reduces the vector to a single value using a callback funct... 10957
- Ds\Vector::reduce (PECL ds >= 1.0.0) Ds\Vector::reduce — Reduces the vector to a single value using a callback function 説明 public function Ds\Vector::reduce ( callable $callback , mixed $initial = ? ): mixed Reduces the vector to a single
... itial The initial value of the carry value. Can be null . 戻り値 The return value of the final callback. 例 例1 Ds\Vector::reduce() with initial value example <?php $vector = new \Ds\Vector ([ 1 , 2 , 3 ]); $callback = function( $carry , $value ) { ret ... urn $carry * $value ; }; var_dump ( $vector -> reduce ( $callback , 5 )); // Iterations: // // $carry = $initial = 5 // // $carry = $carry * 1 = 5 // $carry = $carry * 2 = 10 / ... / $carry = $carry * 3 = 30 ?> 上の例の出力は、 たとえば以下のようになります。 int(30) 例2 Ds\Vector::reduce() without an initial value example <?php $vector = new \Ds\Vector ([ 1 , 2 , 3 ]); var_dump ( $vector -> reduce (function( ...
-
https://man.mtool.work/php/8.3/ds-vector.reduce.html
- Ds\Map::reduce — Reduces the map to a single value using a callback function | ... 10893
- Ds\Map::reduce (PECL ds >= 1.0.0) Ds\Map::reduce — Reduces the map to a single value using a callback function 説明 public function Ds\Map::reduce ( callable $callback , mixed $initial = ? ): mixed Reduces the map to a single value using a
... initial The initial value of the carry value. Can be null . 戻り値 The return value of the final callback. 例 例1 Ds\Map::reduce() with initial value example <?php $map = new \Ds\Map ([ "a" => 1 , "b" => 2 , "c" => 3 ]); $callback = function( $carry , ... $key , $value ) { return $carry * $value ; }; var_dump ( $map -> reduce ( $callback , 5 )); // Iterations: // // $carry = $initial = 5 // // $carry = $carry * 1 = 5 // $carry = $carry * 2 = 10 / ... / $carry = $carry * 3 = 30 ?> 上の例の出力は、 たとえば以下のようになります。 int(30) 例2 Ds\Map::reduce() without an initial value example <?php $map = new \Ds\Map ([ "a" => 1 , "b" => 2 , "c" => 3 ]); var_dump ( $map -> reduc ...
-
https://man.mtool.work/php/8.3/ds-map.reduce.html
- sodium_crypto_core_ristretto255_scalar_reduce — スカラー値を縮小する | PHP 8.3 8903
- sodium_crypto_core_ristretto255_scalar_reduce (PHP 8 >= 8.1.0) sodium_crypto_core_ristretto255_scalar_reduce — スカラー値を縮小する 説明 function sodium_crypto_core_ristretto255_scalar_reduce ( string $s ): string スカラー値を縮小します。 l
...
-
https://man.mtool.work/php/8.3/function.sodium-crypto-core-ristretto255-scalar-r...
- The Parle\Parser class | PHP 8.3 8117
- The Parle\Parser class (PECL parle >= 0.5.1) はじめに Parser class. Rules can be defined on the fly. Once finalized, a Parle\Lexer instance is required to deliver the token stream. クラス概要 class Parle\Parser { /* 定数 */ const int ACTION
... _ERROR = 0 ; const int ACTION_SHIFT = 1 ; const int ACTION_REDUCE = 2 ; const int ACTION_GOTO = 3 ; const int ACTION_ACCEPT = 4 ; const int ERROR_SYNTAX = 0 ; const int ERROR_NON_ASSOCIATI ... VE = 1 ; const int ERROR_UNKNOWN_TOKEN = 2 ; /* プロパティ */ public int $ action = 0 ; public int $ reduceId = 0 ; /* メソッド */ public function advance (): void public function build (): void public function consume ( string $d ... ata , Parle\Lexer $lexer ): bool } 定義済み定数 Parle\Parser::ACTION_ERROR Parle\Parser::ACTION_SHIFT Parle\Parser::ACTION_REDUCE Parle\Parser::ACTION_GOTO Parle\Parser::ACTION_ACCEPT Parle\Parser::ERROR_SYNTAX Parle\Parser::ERROR_NON_ASSOCIATIVE Parle ...
-
https://man.mtool.work/php/8.3/class.parle-parser.html
- The Parle\RParser class | PHP 8.3 8117
- The Parle\RParser class (PECL parle >= 0.7.0) はじめに Parser class. Rules can be defined on the fly. Once finalized, a Parle\RLexer instance is required to deliver the token stream. クラス概要 class Parle\RParser { /* 定数 */ const int ACT
... ION_ERROR = 0 ; const int ACTION_SHIFT = 1 ; const int ACTION_REDUCE = 2 ; const int ACTION_GOTO = 3 ; const int ACTION_ACCEPT = 4 ; const int ERROR_SYNTAX = 0 ; const int ERROR_NON_ASSOCIATI ... VE = 1 ; const int ERROR_UNKNOWN_TOKEN = 2 ; /* プロパティ */ public int $ action = 0 ; public int $ reduceId = 0 ; /* メソッド */ public function advance (): void public function build (): void public function consume ( string $d ... , Parle\RLexer $lexer ): bool } 定義済み定数 Parle\RParser::ACTION_ERROR Parle\RParser::ACTION_SHIFT Parle\RParser::ACTION_REDUCE Parle\RParser::ACTION_GOTO Parle\RParser::ACTION_ACCEPT Parle\RParser::ERROR_SYNTAX Parle\RParser::ERROR_NON_ASSOCIATIVE P ...
-
https://man.mtool.work/php/8.3/class.parle-rparser.html
- Imagick::getImageHistogram — 画像のヒストグラムを取得する | PHP 8.3 8053
- Imagick::getImageHistogram (PECL imagick 2, PECL imagick 3) Imagick::getImageHistogram — 画像のヒストグラムを取得する 説明 public function Imagick::getImageHistogram (): array 画像のヒストグラムを ImagickPixel オブジェクトの配列で返します。
... , \Imagick :: COLOR_GREEN ), 'blue' => getColorStatistics ( $histogramElements , \Imagick :: COLOR_BLUE ), ]; $max = array_reduce ( $colorValues [ 'red' ] , $getMax , 0 ); $max = array_reduce ( $colorValues [ 'lime' ] , $getMax , $max ); $max = array_r ...
-
https://man.mtool.work/php/8.3/imagick.getimagehistogram.html