nslj.src.lang
Class NslDouble1

java.lang.Object
  |
  +--EDU.gatech.cc.is.abstractrobot.ControlSystemS
        |
        +--EDU.gatech.cc.is.abstractrobot.ControlSystemMFN150
              |
              +--nslj.src.lang.NslBase
                    |
                    +--nslj.src.lang.NslData
                          |
                          +--nslj.src.lang.NslNumeric
                                |
                                +--nslj.src.lang.NslNumeric1
                                      |
                                      +--nslj.src.lang.NslDouble1
Direct Known Subclasses:
NslDinDouble1, NslDoutDouble1

public class NslDouble1
extends NslNumeric1


Field Summary
 double[] _data
           
 
Fields inherited from class nslj.src.lang.NslBase
_accessChar, _name, _parent
 
Fields inherited from class EDU.gatech.cc.is.abstractrobot.ControlSystemMFN150
abstract_robot
 
Fields inherited from class EDU.gatech.cc.is.abstractrobot.ControlSystemS
CSSTAT_DONE, CSSTAT_ERROR, CSSTAT_OK, seed
 
Constructor Summary
NslDouble1()
          Constructor - initialize the reference of the number to be null
NslDouble1(double[] d)
          Constructor, copy the contain of array d to the new number
NslDouble1(int size)
          Constructor, initialize the number to be size size 1-D array
NslDouble1(NslNumeric1 n)
          Constructor, initialize the value to the same as another NslNumeric1
NslDouble1(java.lang.String name)
          This constructs a number with specified name
NslDouble1(java.lang.String name, double[] d)
          This constructs a number with specified name
NslDouble1(java.lang.String name, int size)
          This constructs a number with specified name
NslDouble1(java.lang.String name, NslHierarchy curParent)
           
NslDouble1(java.lang.String name, NslHierarchy curParent, int size)
           
NslDouble1(java.lang.String name, NslHierarchy curParent, NslNumeric1 n)
          This constructs a number with specified name
NslDouble1(java.lang.String name, NslNumeric1 n)
           
 
Method Summary
 void duplicateData(NslData n)
          Duplicating data from _new data of double buffered port to _old data object
 NslData duplicateThis()
          Copy itself
 double[] get()
          Get the contain of 1D array in double precision floating point
 double get(int pos)
           
 double getdouble(int pos)
          Get the value of posth element in this number in double precision floating point
 double[] getdouble1()
          Get the array in double precision floating point
 float getfloat(int pos)
          Get the value of posth element in this number in single precision floating point
 float[] getfloat1()
          Get the array in single precision floating point
 int getint(int pos)
          Get the value of posth element in this number in integer
 int[] getint1()
          Get the array in integer
 NslDouble1 getNslDouble1()
          Get a NslDouble1 array with the same value as this array
 NslFloat1 getNslFloat1()
          Create a NslFloat1 array with the same value as this array
 NslInt1 getNslInt1()
          Create a NslInt1 array with the same value as this array
 NslNumeric1 getNslNumeric1()
          Get a NslNumeric1 array with the same value as this array
 void getNslSize(NslInt0 size)
          get the size of this array and put it into size
 double[] getSector(int start, int end)
          Create an array that captures element start to end if start is smaller than 0, start is default as 0; if end is greater than the length of the array, end is default as the length of the array
 int getSize()
          get the size of this array
 int getSize1()
          get the size of this array at the first dimension
 int[] getSizes()
          get the size of this array and put it into size
 boolean isDataSet()
          Check if the reference is well-defined
 void nslMemAlloc(int size)
           
 void print()
           
 void resetData()
          Reset the reference pointer to null
 void set(double value)
          Set all elements of this array to value
 void set(double[] value)
          Set the value of this array to value
 void set(float value)
          Set all elements of this array to value
 void set(float[] value)
          Set the value of this array to value
 void set(int value)
          Set all elements of this array to value
 void set(int[] value)
          Set the value of this array to value
 void set(int pos, double value)
          Set the posth element of this array to value
 void set(int pos, float value)
          Set the posth element of this array to value
 void set(int pos, int value)
          Set the posth element of this array to value
 void set(int pos, NslNumeric0 value)
          Set the posth element of this array to value
 void set(NslNumeric0 value)
          Set all elements of this array to value
 void set(NslNumeric1 value)
          Set the value of this array to value
 void setReference(NslData n)
          Reset the reference of _data to a number object
 void setSector(double[] d, int startpos)
          Set the value of the array from startpos to d If the array d longer than this array, those out of array scope elements are ignored.
 java.lang.String toString()
          Print the value of the numberic
 
Methods inherited from class nslj.src.lang.NslNumeric1
getDimensions
 
Methods inherited from class nslj.src.lang.NslData
getDataType, getInport, getNslSizes, getOutport, getSize2, getSize3, getSize4, nslGetPort
 
Methods inherited from class nslj.src.lang.NslBase
nslGetAccess, nslGetName, nslGetParent, nslGetParentClass, nslGetParentModule, nslGetRealName, nslNullifyParent, nslSetAccess, nslSetName, nslSetParent
 
Methods inherited from class EDU.gatech.cc.is.abstractrobot.ControlSystemMFN150
init
 
Methods inherited from class EDU.gatech.cc.is.abstractrobot.ControlSystemS
configure, Configure, getAbstractRobot, Init, quit, takeStep, TakeStep, trialEnd, TrialEnd, trialInit, TrialInit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_data

public double[] _data
Constructor Detail

NslDouble1

public NslDouble1(double[] d)
Constructor, copy the contain of array d to the new number
Parameters:
d - - the value of new number

NslDouble1

public NslDouble1(NslNumeric1 n)
Constructor, initialize the value to the same as another NslNumeric1
Parameters:
n - - a 1-D array

NslDouble1

public NslDouble1(int size)
Constructor, initialize the number to be size size 1-D array
Parameters:
size - - size of the new array

NslDouble1

public NslDouble1()
Constructor - initialize the reference of the number to be null
See Also:

NslDouble1

public NslDouble1(java.lang.String name)
This constructs a number with specified name
Parameters:
name - - name of the variable

NslDouble1

public NslDouble1(java.lang.String name,
                  NslHierarchy curParent)

NslDouble1

public NslDouble1(java.lang.String name,
                  int size)
This constructs a number with specified name
Parameters:
name - - name of the variable
size - - size of the array

NslDouble1

public NslDouble1(java.lang.String name,
                  NslHierarchy curParent,
                  int size)

NslDouble1

public NslDouble1(java.lang.String name,
                  NslHierarchy curParent,
                  NslNumeric1 n)
This constructs a number with specified name
Parameters:
name - - name of the variable
n - - initialized values

NslDouble1

public NslDouble1(java.lang.String name,
                  NslNumeric1 n)

NslDouble1

public NslDouble1(java.lang.String name,
                  double[] d)
This constructs a number with specified name
Parameters:
name - - name of the variable
n - - initialized values
Method Detail

nslMemAlloc

public void nslMemAlloc(int size)

get

public double[] get()
Get the contain of 1D array in double precision floating point
Returns:
array - in double precision pointing point

get

public double get(int pos)

getdouble1

public double[] getdouble1()
Get the array in double precision floating point
Overrides:
getdouble1 in class NslNumeric1
Returns:
array - in double precision pointing point

getfloat1

public float[] getfloat1()
Get the array in single precision floating point
Overrides:
getfloat1 in class NslNumeric1
Returns:
array - in single precision pointing point

getint1

public int[] getint1()
Get the array in integer
Overrides:
getint1 in class NslNumeric1
Returns:
array - in integer

getdouble

public double getdouble(int pos)
Get the value of posth element in this number in double precision floating point
Overrides:
getdouble in class NslNumeric1
Parameters:
pos - - position of the array
Returns:
value - in double precision pointing point

getfloat

public float getfloat(int pos)
Get the value of posth element in this number in single precision floating point
Overrides:
getfloat in class NslNumeric1
Parameters:
pos - - position of the array
Returns:
value - in single precision pointing point

getint

public int getint(int pos)
Get the value of posth element in this number in integer
Overrides:
getint in class NslNumeric1
Parameters:
pos - - position of the array
Returns:
value - in integer

getNslNumeric1

public NslNumeric1 getNslNumeric1()
Get a NslNumeric1 array with the same value as this array
Returns:
array - in NslNumeric1

getNslDouble1

public NslDouble1 getNslDouble1()
Get a NslDouble1 array with the same value as this array
Overrides:
getNslDouble1 in class NslNumeric1
Returns:
array - in NslDouble1

getNslFloat1

public NslFloat1 getNslFloat1()
Create a NslFloat1 array with the same value as this array
Overrides:
getNslFloat1 in class NslNumeric1
Returns:
array - in NslFloat1

getNslInt1

public NslInt1 getNslInt1()
Create a NslInt1 array with the same value as this array
Overrides:
getNslInt1 in class NslNumeric1
Returns:
array - in NslInt1

getSector

public double[] getSector(int start,
                          int end)
Create an array that captures element start to end if start is smaller than 0, start is default as 0; if end is greater than the length of the array, end is default as the length of the array
Parameters:
start - - the element number start the capture
end - - the element number ends the capture
Returns:
a section of the original array

set

public void set(double[] value)
Set the value of this array to value
Overrides:
set in class NslNumeric1
Parameters:
value -  

set

public void set(float[] value)
Set the value of this array to value
Overrides:
set in class NslNumeric1
Parameters:
value -  

set

public void set(int[] value)
Set the value of this array to value
Overrides:
set in class NslNumeric1
Parameters:
value -  

set

public void set(int pos,
                double value)
Set the posth element of this array to value
Overrides:
set in class NslNumeric1
Parameters:
pos -  
value -  

set

public void set(int pos,
                float value)
Set the posth element of this array to value
Overrides:
set in class NslNumeric1
Parameters:
pos -  
value -  

set

public void set(int pos,
                int value)
Set the posth element of this array to value
Overrides:
set in class NslNumeric1
Parameters:
pos -  
value -  

set

public void set(double value)
Set all elements of this array to value
Overrides:
set in class NslNumeric1
Parameters:
value -  

set

public void set(float value)
Set all elements of this array to value
Overrides:
set in class NslNumeric1
Parameters:
value -  

set

public void set(int value)
Set all elements of this array to value
Overrides:
set in class NslNumeric1
Parameters:
value -  

set

public void set(NslNumeric1 value)
Set the value of this array to value
Overrides:
set in class NslNumeric1
Parameters:
value -  

set

public void set(NslNumeric0 value)
Set all elements of this array to value
Overrides:
set in class NslNumeric1
Parameters:
value -  

set

public void set(int pos,
                NslNumeric0 value)
Set the posth element of this array to value
Overrides:
set in class NslNumeric1
Parameters:
pos -  
value -  

setSector

public void setSector(double[] d,
                      int startpos)
Set the value of the array from startpos to d If the array d longer than this array, those out of array scope elements are ignored.
Parameters:
d - - object 1-D array

getSize

public int getSize()
get the size of this array
Overrides:
getSize in class NslNumeric1
Returns:
size of this array

getNslSize

public void getNslSize(NslInt0 size)
get the size of this array and put it into size
Overrides:
getNslSize in class NslNumeric1
Parameters:
size -  

getSizes

public int[] getSizes()
get the size of this array and put it into size
Overrides:
getSizes in class NslNumeric1
Returns:
size = return vector of 4 elements

getSize1

public int getSize1()
get the size of this array at the first dimension
Overrides:
getSize1 in class NslNumeric1
Returns:
size of this array

duplicateData

public void duplicateData(NslData n)
Duplicating data from _new data of double buffered port to _old data object
Overrides:
duplicateData in class NslData
Parameters:
n - - number with new value
See Also:
NslOutPort#nslUpdateBuffers

duplicateThis

public NslData duplicateThis()
Copy itself
Overrides:
duplicateThis in class NslData
Returns:
a copy of this array, casted to NslNumeric
See Also:
NslOutport

setReference

public void setReference(NslData n)
Reset the reference of _data to a number object
Overrides:
setReference in class NslData
Parameters:
n - number to be reference

isDataSet

public boolean isDataSet()
Check if the reference is well-defined
Overrides:
isDataSet in class NslData
Returns:
true - if the reference is defined; false - if reference is null

resetData

public void resetData()
Reset the reference pointer to null
Overrides:
resetData in class NslData

print

public void print()

toString

public java.lang.String toString()
Description copied from class: NslData
Print the value of the numberic
Overrides:
toString in class NslData