////////////////////////////////////////////////////////////////////////////
//
//                       Copyright (c) 2005
//                       Future Team Aps 
//                       Denmark
//
//                       All Rights Reserved
//
//   This source file is subject to the terms and conditions of the
//   Future Team Software License Agreement which restricts the manner
//   in which it may be used.
//   Mail: hve@hvks.com
//
/////////////////////////////////////////////////////////////////////////////
//
// Module name     :  arraybase.js
// Module ID Nbr   :   
// Description     :   Javascript array base class. add extension to the Array
//					   object
// --------------------------------------------------------------------------
// Change Record   :   
//
// Version	Author/Date		Description of changes
// -------  -------------	----------------------
// 01.01	HVE/2006-Nov-25	Initial release
// End of Change Record
//
/////////////////////////////////////////////////////////////////////////////

// Extension Array Object
// Class Prototypes
Array.prototype.max=function(){var max=-Infinity;for(var i in this) if(this[i]>max) max=this[i];return max;}
Array.prototype.min=function(){var min=+Infinity;for(var i in this) if(this[i]<min) min=this[i];return min;}
Array.prototype.sum=function(){var sum=0;for(var i in this) sum+=this[i];return sum;}
Array.prototype.avg=function(){if(this.length==0)return Number.NaN; else return this.sum()/this.length;}
Array.prototype.variance=function()
	{var sum,sumsq;sum=0;sumsq=0;for(var i in this) {sum+=this[i]; sumsq+=this[i]*this[i];}
	return (this.length*sumsq-sum*sum)/(this.length*(this.length-1));
	}	
Array.prototype.stdev=function() { return Math.sqrt(this.variance); }	
// Class Methods
// Class properties
