<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/aiplatform/v1/match_service.proto

namespace Google\Cloud\AIPlatform\V1\FindNeighborsRequest\Query;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * Parameters for RRF algorithm that combines search results.
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.FindNeighborsRequest.Query.RRF</code>
 */
class RRF extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Users can provide an alpha value to give more weight to dense
     * vs sparse results. For example, if the alpha is 0, we only return
     * sparse and if the alpha is 1, we only return dense.
     *
     * Generated from protobuf field <code>float alpha = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $alpha = 0.0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type float $alpha
     *           Required. Users can provide an alpha value to give more weight to dense
     *           vs sparse results. For example, if the alpha is 0, we only return
     *           sparse and if the alpha is 1, we only return dense.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\MatchService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Users can provide an alpha value to give more weight to dense
     * vs sparse results. For example, if the alpha is 0, we only return
     * sparse and if the alpha is 1, we only return dense.
     *
     * Generated from protobuf field <code>float alpha = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return float
     */
    public function getAlpha()
    {
        return $this->alpha;
    }

    /**
     * Required. Users can provide an alpha value to give more weight to dense
     * vs sparse results. For example, if the alpha is 0, we only return
     * sparse and if the alpha is 1, we only return dense.
     *
     * Generated from protobuf field <code>float alpha = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param float $var
     * @return $this
     */
    public function setAlpha($var)
    {
        GPBUtil::checkFloat($var);
        $this->alpha = $var;

        return $this;
    }

}


