function Index(ranges) {
    if (!(this instanceof Index)) {
      throw new SyntaxError('Constructor must be called with the new operator');
    }

    this._dimensions = [];
    this._isScalar = true;

    for (var i = 0, ii = arguments.length; i < ii; i++) {
      var arg = arguments[i];

      if (type.isRange(arg)) {
        this._dimensions.push(arg);

        this._isScalar = false;
      } else if (Array.isArray(arg) || type.isMatrix(arg)) {
        // create matrix
        var m = _createImmutableMatrix(arg.valueOf());

        this._dimensions.push(m); // size


        var size = m.size(); // scalar

        if (size.length !== 1 || size[0] !== 1) {
          this._isScalar = false;
        }
      } else if (typeof arg === 'number') {
        this._dimensions.push(_createImmutableMatrix([arg]));
      } else if (typeof arg === 'string') {
        // object property (arguments.count should be 1)
        this._dimensions.push(arg);
      } else {
        throw new TypeError('Dimension must be an Array, Matrix, number, string, or Range');
      } // TODO: implement support for wildcard '*'

    }
  }
Create an index. An Index can store ranges and sets for multiple dimensions.
Matrix.get, Matrix.set, and math.subset accept an Index as input.

Usage:
    const index = new Index(range1, range2, matrix1, array1, ...)

Where each parameter can be any of:
    A number
    A string (containing a name of an object property)
    An instance of Range
    An Array with the Set values
    A Matrix with the Set values

The parameters start, end, and step must be integer numbers.

@class Index
@Constructor Index
@param {...*} ranges