| @@ 5-131 (lines=127) @@ | ||
| 2 | ||
| 3 | namespace GroupByInc\API\Model; |
|
| 4 | ||
| 5 | class Biasing |
|
| 6 | { |
|
| 7 | /** |
|
| 8 | * @var string[] |
|
| 9 | */ |
|
| 10 | private $bringToTop = array(); |
|
| 11 | ||
| 12 | /** |
|
| 13 | * @var bool |
|
| 14 | */ |
|
| 15 | private $augmentBiases = false; |
|
| 16 | ||
| 17 | /** |
|
| 18 | * @var float|null |
|
| 19 | */ |
|
| 20 | private $influence = null; |
|
| 21 | ||
| 22 | /** |
|
| 23 | * @var NumericBoost[] |
|
| 24 | */ |
|
| 25 | private $numericBoosts = array(); |
|
| 26 | ||
| 27 | /** |
|
| 28 | * @var Bias[] |
|
| 29 | */ |
|
| 30 | private $biases = array(); |
|
| 31 | ||
| 32 | ||
| 33 | /** |
|
| 34 | * @return string[] The list of product IDs |
|
| 35 | */ |
|
| 36 | public function getBringToTop() |
|
| 37 | { |
|
| 38 | return $this->bringToTop; |
|
| 39 | } |
|
| 40 | ||
| 41 | /** |
|
| 42 | * A list of product IDs to bring to the top of the result set. This list |
|
| 43 | * will ensure that the products are included in the result set and appear in the order |
|
| 44 | * defined. |
|
| 45 | * |
|
| 46 | * @param string[] $bringToTop The list of productIds. |
|
| 47 | * |
|
| 48 | * @return Biasing |
|
| 49 | */ |
|
| 50 | public function setBringToTop($bringToTop) |
|
| 51 | { |
|
| 52 | $this->bringToTop = $bringToTop; |
|
| 53 | return $this; |
|
| 54 | } |
|
| 55 | ||
| 56 | /** |
|
| 57 | * @return boolean |
|
| 58 | */ |
|
| 59 | public function isAugmentBiases() |
|
| 60 | { |
|
| 61 | return $this->augmentBiases; |
|
| 62 | } |
|
| 63 | ||
| 64 | /** |
|
| 65 | * @param boolean $augmentBiases |
|
| 66 | * |
|
| 67 | * @return Biasing |
|
| 68 | */ |
|
| 69 | public function setAugmentBiases($augmentBiases) |
|
| 70 | { |
|
| 71 | $this->augmentBiases = $augmentBiases; |
|
| 72 | return $this; |
|
| 73 | } |
|
| 74 | ||
| 75 | /** |
|
| 76 | * @return float|null |
|
| 77 | */ |
|
| 78 | public function getInfluence() |
|
| 79 | { |
|
| 80 | return $this->influence; |
|
| 81 | } |
|
| 82 | ||
| 83 | /** |
|
| 84 | * @param float|null $influence |
|
| 85 | * |
|
| 86 | * @return Biasing |
|
| 87 | */ |
|
| 88 | public function setInfluence($influence) |
|
| 89 | { |
|
| 90 | $this->influence = $influence; |
|
| 91 | return $this; |
|
| 92 | } |
|
| 93 | ||
| 94 | /** |
|
| 95 | * @return NumericBoost[] |
|
| 96 | */ |
|
| 97 | public function getNumericBoosts() |
|
| 98 | { |
|
| 99 | return $this->numericBoosts; |
|
| 100 | } |
|
| 101 | ||
| 102 | /** |
|
| 103 | * @param NumericBoost[] $numericBoosts |
|
| 104 | * |
|
| 105 | * @return NumericBoost |
|
| 106 | */ |
|
| 107 | public function setNumericBoosts($numericBoosts) |
|
| 108 | { |
|
| 109 | $this->numericBoosts = $numericBoosts; |
|
| 110 | return $this; |
|
| 111 | } |
|
| 112 | ||
| 113 | /** |
|
| 114 | * @return Bias[] |
|
| 115 | */ |
|
| 116 | public function getBiases() |
|
| 117 | { |
|
| 118 | return $this->biases; |
|
| 119 | } |
|
| 120 | ||
| 121 | /** |
|
| 122 | * @param Bias[] $biases |
|
| 123 | * |
|
| 124 | * @return Biasing |
|
| 125 | */ |
|
| 126 | public function setBiases($biases) |
|
| 127 | { |
|
| 128 | $this->biases = $biases; |
|
| 129 | return $this; |
|
| 130 | } |
|
| 131 | } |
|
| @@ 5-124 (lines=120) @@ | ||
| 2 | ||
| 3 | namespace GroupByInc\API\Request; |
|
| 4 | ||
| 5 | class Biasing |
|
| 6 | { |
|
| 7 | /** @var string[] */ |
|
| 8 | private $bringToTop = array(); |
|
| 9 | ||
| 10 | /** |
|
| 11 | * @var bool |
|
| 12 | */ |
|
| 13 | private $augmentBiases = false; |
|
| 14 | ||
| 15 | /** |
|
| 16 | * @var float|null |
|
| 17 | */ |
|
| 18 | private $influence = null; |
|
| 19 | ||
| 20 | /** |
|
| 21 | * @var Bias[] |
|
| 22 | */ |
|
| 23 | private $biases = array(); |
|
| 24 | ||
| 25 | /** |
|
| 26 | * @var NumericBoost[] |
|
| 27 | */ |
|
| 28 | private $numericBoosts = array(); |
|
| 29 | ||
| 30 | /** |
|
| 31 | * @return string[] |
|
| 32 | */ |
|
| 33 | public function getBringToTop() |
|
| 34 | { |
|
| 35 | return $this->bringToTop; |
|
| 36 | } |
|
| 37 | ||
| 38 | /** |
|
| 39 | * @param string[] $bringToTop |
|
| 40 | * |
|
| 41 | * @return Biasing |
|
| 42 | */ |
|
| 43 | public function setBringToTop($bringToTop) |
|
| 44 | { |
|
| 45 | $this->bringToTop = $bringToTop; |
|
| 46 | return $this; |
|
| 47 | } |
|
| 48 | ||
| 49 | /** |
|
| 50 | * @return boolean |
|
| 51 | */ |
|
| 52 | public function isAugmentBiases() |
|
| 53 | { |
|
| 54 | return $this->augmentBiases; |
|
| 55 | } |
|
| 56 | ||
| 57 | /** |
|
| 58 | * @param boolean $augmentBiases |
|
| 59 | * |
|
| 60 | * @return Biasing |
|
| 61 | */ |
|
| 62 | public function setAugmentBiases($augmentBiases) |
|
| 63 | { |
|
| 64 | $this->augmentBiases = $augmentBiases; |
|
| 65 | return $this; |
|
| 66 | } |
|
| 67 | ||
| 68 | /** |
|
| 69 | * @return float|null |
|
| 70 | */ |
|
| 71 | public function getInfluence() |
|
| 72 | { |
|
| 73 | return $this->influence; |
|
| 74 | } |
|
| 75 | ||
| 76 | /** |
|
| 77 | * @param float|null $influence |
|
| 78 | * |
|
| 79 | * @return Biasing |
|
| 80 | */ |
|
| 81 | public function setInfluence($influence) |
|
| 82 | { |
|
| 83 | $this->influence = $influence; |
|
| 84 | return $this; |
|
| 85 | } |
|
| 86 | ||
| 87 | /** |
|
| 88 | * @return NumericBoost[] |
|
| 89 | */ |
|
| 90 | public function getNumericBoosts() |
|
| 91 | { |
|
| 92 | return $this->numericBoosts; |
|
| 93 | } |
|
| 94 | ||
| 95 | /** |
|
| 96 | * @param NumericBoost[] $numericBoosts |
|
| 97 | * |
|
| 98 | * @return NumericBoost |
|
| 99 | */ |
|
| 100 | public function setNumericBoosts($numericBoosts) |
|
| 101 | { |
|
| 102 | $this->numericBoosts = $numericBoosts; |
|
| 103 | return $this; |
|
| 104 | } |
|
| 105 | ||
| 106 | /** |
|
| 107 | * @return Bias[] |
|
| 108 | */ |
|
| 109 | public function getBiases() |
|
| 110 | { |
|
| 111 | return $this->biases; |
|
| 112 | } |
|
| 113 | ||
| 114 | /** |
|
| 115 | * @param Bias[] $biases |
|
| 116 | * |
|
| 117 | * @return Biasing |
|
| 118 | */ |
|
| 119 | public function setBiases($biases) |
|
| 120 | { |
|
| 121 | $this->biases = $biases; |
|
| 122 | return $this; |
|
| 123 | } |
|
| 124 | } |
|