WP File Manager
Current Path:
/
home
/
argothem
/
www
/
organecyberpresse
/
plugins
/
auto
/
adaptive_images
/
v3.4.0
/
lib
/
geometrize
/
geometrize
/
Name
Action
..
AbstractEnumTools.class.php
Edit
Core.class.php
Edit
Model.class.php
Edit
State.class.php
Edit
_ArraySet
bitmap
exporter
rasterizer
runner
shape
Editing: State.class.php
<?php // Generated by Haxe 3.4.7 class geometrize_State { /** * @var geometrize_shape_Shape */ protected $shape; /** * @var int */ protected $alpha; /** * @var int */ protected $score; /** * @var geometrize_bitmap_Bitmap */ protected $target; /** * @var geometrize_bitmap_Bitmap */ protected $current; /** * @var geometrize_bitmap_Bitmap */ protected $buffer; public function __construct($shape, $alpha, $target, $current, $buffer){ if (!($shape!==null)){ throw new HException("FAIL: shape != null"); } $this->shape = $shape; $this->alpha = $alpha; $this->score = -1; $this->target = $target; $this->current = $current; $this->buffer = $buffer; } /** * @param int $lastScore * @param null|int $bestScore * @return int * @throws HException */ public function energy($lastScore, $bestScore = null){ if ($this->score<0){ $this->score = geometrize_Core::energy($this->shape, $this->alpha, $this->target, $this->current, $this->buffer, $lastScore, $bestScore); } return $this->score; } /** * @return geometrize_State */ public function mutate(){ $this->shape->mutate(); // force score recomputing as we mutated $this->score = -1; } /** * @return geometrize_shape_Shape */ public function getShape() { return $this->shape; } /** * @return int */ public function getAlpha() { return $this->alpha; } public function __clone() { $this->shape = clone $this->shape; /* $this->target = clone $this->target; $this->current = clone $this->current; $this->buffer = clone $this->buffer; */ } function __toString(){ return 'geometrize.State'; } }