protected static Ptg calcMode( Ptg[] operands )
	{
		Ptg[] alloperands = PtgCalculator.getAllComponents( operands );
		Vector vals = new Vector();
		Vector occurences = new Vector();
		double retval = 0;
		for( Ptg p : alloperands )
		{
			try
			{
				Double d = new Double( String.valueOf( p.getValue() ) );
				if( vals.contains( d ) )
				{
					int loc = vals.indexOf( d );
					Double nums = (Double) occurences.get( loc );
					Double newnum = nums + 1;
					occurences.setElementAt( newnum, loc );
				}
				else
				{
					vals.add( d );
					occurences.add( (double) 1 );
				}
			}
			catch( NumberFormatException e )
			{
			}
			;
		}
		double biggest = 0;
		double numvalues = 0;
		for( int i = 0; i < vals.size(); i++ )
		{
			Double size = (Double) occurences.elementAt( i );
			if( size > biggest )
			{
				biggest = size;
				Double newhigh = (Double) vals.elementAt( i );
				retval = newhigh;
			}
		}
		PtgNumber pnum = new PtgNumber( retval );
		return pnum;
	}