gt:             noElem *= sizeA[i];
context: /* 
   * This file is part or JMathLib 
   * 
   * Check it out at http://www.jmathlib.de
   *
   * Author:   
   * (c) 2005-2009   
   */
  package jmathlib.core.tokens.numbertokens;
  
  import jmathlib.core.interpreter.ErrorLogger;
  import jmathlib.core.interpreter.Errors;
  import jmathlib.core.tokens.DataToken;
  import jmathlib.core.tokens.NumberToken;
  import jmathlib.core.tokens.OperandToken;
  import jmathlib.core.tokens.Token;
  
  
  public class UInt32NumberToken extends NumberToken
  {            
      /**Complex values of the token
       * the data is organizes as on single vector. 
       * e.g. a=[1,2;3,4] will be stored like below
       * values = 1
       *          3
       *          2
       *          4         */
      private long values[][]; 
  
  
      /** Constructor creating empty number token 
       */
      public UInt32NumberToken()
      {
          // empty number token
          super(5, "uint32");
          sizeY  = 0;
          sizeX  = 0;
          sizeA  = new int[]{0,0};
          noElem = 0;
          values = null;
      }
  
      /** Constructor creating a scalar taking the numbers value as a double
       * @param _value = the numbers value as a double
       */
      public UInt32NumberToken(long _value)
      {
          this(_value, (long)0);
      }
  
      /** Constructor taking the numbers value as a double[][]
       * @param _value = the numbers value as a 2D array of double
       */
      public UInt32NumberToken(long[][] _values)
      {
          this(_values, null);
      }
  
      /**Constructor taking the numbers value as a string
       * @param _real = the numbers real value as a string
       * @param _imaginary = the numbers imaginary value as a string
       */
      public UInt32NumberToken(String _real, String _imaginary)
      {
          super(5, "uint32"); 
          sizeX  = 1;
          sizeY  = 1;
          sizeA  = new int[]{1, 1};
          noElem = 1;
          values = new long[1][2];
  
          // create real part
          if (_real!=null)
              values[0][REAL] = new Long(_real).longValue();
          else
              values[0][REAL] = 0;
          
          // create imaginary part
          if (_imaginary!=null)
              values[0][IMAG] = new Long(_imaginary).longValue();
          else
              values[0][IMAG] = 0;
      }
  
      /**Constructor taking the numbers value as a pair of double
       *  values representing real and imaginary part
       * @param _real = the numbers real value as a double
       * @param _imaginary = the numbers imaginary value as a double
       */
      public UInt32NumberToken(long _real, long _imaginary)
      {
          super(5, "uint32"); 
          sizeX  = 1;
          sizeY  = 1;
          sizeA  = new int[]{1, 1};
          noElem = 1;
          values = new long[1][2];
  
          values[0][REAL] = _real;
          values[0][IMAG] = _imaginary;
      }
  
      /**Constructor taking the numbers value as two double[][]
      @param _real = the numbers value as a 2D array of double
      @param _imaginary = the numbers value as a 2D array of double*/
      public UInt32NumberToken(long[][] _real, long[][] _imaginary)
      {
          super(5, "uint32"); 
  
          if (_real!=null)
          {
              sizeY  = _real.length;
              sizeX  = _real[0].length;
          }
          else if(_imaginary!=null)
          {
              sizeY  = _imaginary.length;
              sizeX  = _imaginary[0].length;
          }   
          sizeA  = new int[]{sizeY, sizeX};
          noElem = sizeY * sizeX;
          values = new long[noElem][2];        
  
          for(int xx = 0; xx < sizeX; xx++)
          {
              for(int yy = 0; yy < sizeY; yy++)
              {
                  if (_real != null)
                      values[xx*sizeY+yy][REAL] = _real[yy][xx];
                  else
                      values[xx*sizeY+yy][REAL] = 0;
                  
                  if (_imaginary != null)
                      values[xx*sizeY+yy][IMAG] = _imaginary[yy][xx];
                  else
                      values[xx*sizeY+yy][IMAG] = 0;
              }
          }
      }
  
      /**Constructor taking the numbers value as a double[][][]
         @param _values = the numbers value as a 3D array of double*/
      public UInt32NumberToken(long[][][] _values)
      {
          super(5, "uint32"); 
          sizeY  = _values.length;
          sizeX  = _values[0].length;
          sizeA  = new int[]{sizeY, sizeX};
          noElem = sizeY * sizeX;
          values = new long[noElem][2];        
  
          for(int xx = 0; xx < sizeX; xx++)
          {
              for(int yy = 0; yy < sizeY; yy++)
              {
                  values[xx*sizeY+yy][REAL] = _values[yy][xx][REAL];
                  values[xx*sizeY+yy][IMAG] = _values[yy][xx][IMAG];
              }
          }
      }
  
      /**
       * 
       * @param _dy
       * @param _dx
       * @param _reValues
       * @param _imValues
       */
      public UInt32NumberToken(int _dy, int _dx, long[] _reValues, long[] _imValues)
      {
          super(5, "uint32"); 
          sizeY  = _dy;
          sizeX  = _dx;
          sizeA  = new int[]{sizeY, sizeX};
          noElem = sizeY * sizeX;
          values = new long[noElem][2];        
  
          if ((_reValues != null)             &&
              (noElem    != _reValues.length)    )
              Errors.throwMathLibException("UInt32NumberToken: real dimension mismatch");
  
          if ((_imValues != null)             &&
              (noElem    != _imValues.length)    )
              Errors.throwMathLibException("UInt32NumberToken: imag dimension mismatch");
  
          for(int ni = 0; ni< noElem; ni++)
          {
              if (_reValues != null)
                  values[ni][REAL] = _reValues[ni];
              else
                  values[ni][REAL] = 0;
                  
              if (_imValues != null)
                  values[ni][IMAG] = _imValues[ni];
              else
                  values[ni][IMAG] = 0;
          }
          
          
      }
  
      /**
       * Constructor for multidimensional array
       * @param _sizeA
       * @param _reValues
       * @param _imValues
       */
      public UInt32NumberToken(int[] _sizeA, long[] _reValues, long[] _imValues)
      {
          super(5, "uint32"); 
          sizeA  = _sizeA;
  
          if (sizeA.length<2)
              Errors.throwMathLibException("UInt32NumberToken: dimension too low <2");
          
          sizeY  = sizeA[0];
          sizeX  = sizeA[1];
  
          // compute number of elements over all dimensions
          noElem = 1;
          for (int i=0; i<sizeA.length; i++)
          {
  