function Vector(ArrayClass, initialCapacityOrOptions) {
  if (arguments.length < 1)
    throw new Error('mnemonist/vector: expecting at least a byte array constructor.');

  var initialCapacity = initialCapacityOrOptions || 0,
      policy = DEFAULT_GROWING_POLICY,
      initialLength = 0,
      factory = false;

  if (typeof initialCapacityOrOptions === 'object') {
    initialCapacity = initialCapacityOrOptions.initialCapacity || 0;
    initialLength = initialCapacityOrOptions.initialLength || 0;
    policy = initialCapacityOrOptions.policy || policy;
    factory = initialCapacityOrOptions.factory === true;
  }

  this.factory = factory ? ArrayClass : null;
  this.ArrayClass = ArrayClass;
  this.length = initialLength;
  this.capacity = Math.max(initialLength, initialCapacity);
  this.policy = policy;
  this.array = new ArrayClass(this.capacity);
}
Vector.

@constructor
@param {function}      ArrayClass             - An array constructor.
@param {number|object} initialCapacityOrOptions - Self-explanatory:
@param {number}        initialCapacity          - Initial capacity.
@param {number}        initialLength            - Initial length.
@param {function}      policy                   - Allocation policy.