public double max(){
  double maxVal=this.vector[0];
  for (  final double val : this.vector) {
    maxVal=Math.max(maxVal,val);
  }
  return maxVal;
}

public double max ( ) { double maxVal = this . vector [ 0 ] ; for ( final double val : this . vector ) { maxVal = Math . max ( maxVal , val ) ; } return maxVal ; }
gets the maximum value for an individual element in this vector .
