<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: vector.proto

namespace Messages;

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

/**
 * Generated from protobuf message <code>Messages.SparseMatrix</code>
 */
class SparseMatrix extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string name = 1;</code>
     */
    protected $name = '';
    /**
     * Generated from protobuf field <code>repeated uint32 size_hint = 2 [packed = true];</code>
     */
    private $size_hint;
    /**
     *1:1 mapping between indices and values
     *
     * Generated from protobuf field <code>repeated uint32 indices = 3 [packed = true];</code>
     */
    private $indices;
    /**
     * Generated from protobuf field <code>repeated double values = 4 [packed = true];</code>
     */
    private $values;
    /**
     * Generated from protobuf field <code>.Messages.Extrema bounds = 5;</code>
     */
    protected $bounds = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *     @type int[]|\Google\Protobuf\Internal\RepeatedField $size_hint
     *     @type int[]|\Google\Protobuf\Internal\RepeatedField $indices
     *          1:1 mapping between indices and values
     *     @type float[]|\Google\Protobuf\Internal\RepeatedField $values
     *     @type \Messages\Extrema $bounds
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Vector::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>string name = 1;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Generated from protobuf field <code>string name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated uint32 size_hint = 2 [packed = true];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getSizeHint()
    {
        return $this->size_hint;
    }

    /**
     * Generated from protobuf field <code>repeated uint32 size_hint = 2 [packed = true];</code>
     * @param int[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setSizeHint($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::UINT32);
        $this->size_hint = $arr;

        return $this;
    }

    /**
     *1:1 mapping between indices and values
     *
     * Generated from protobuf field <code>repeated uint32 indices = 3 [packed = true];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getIndices()
    {
        return $this->indices;
    }

    /**
     *1:1 mapping between indices and values
     *
     * Generated from protobuf field <code>repeated uint32 indices = 3 [packed = true];</code>
     * @param int[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setIndices($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::UINT32);
        $this->indices = $arr;

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated double values = 4 [packed = true];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getValues()
    {
        return $this->values;
    }

    /**
     * Generated from protobuf field <code>repeated double values = 4 [packed = true];</code>
     * @param float[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setValues($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::DOUBLE);
        $this->values = $arr;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.Messages.Extrema bounds = 5;</code>
     * @return \Messages\Extrema|null
     */
    public function getBounds()
    {
        return $this->bounds;
    }

    public function hasBounds()
    {
        return isset($this->bounds);
    }

    public function clearBounds()
    {
        unset($this->bounds);
    }

    /**
     * Generated from protobuf field <code>.Messages.Extrema bounds = 5;</code>
     * @param \Messages\Extrema $var
     * @return $this
     */
    public function setBounds($var)
    {
        GPBUtil::checkMessage($var, \Messages\Extrema::class);
        $this->bounds = $var;

        return $this;
    }

}

