nslj.src.lang
Class NslFloat1

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.NslFloat1
Direct Known Subclasses:
NslDinFloat1, NslDoutFloat1

public class NslFloat1
extends NslNumeric1


Field Summary
 float[] _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
NslFloat1()
          Constructor - initialize the reference of the number to be null
NslFloat1(float[] d)
          Constructor, copy the contain of array d to the new number
NslFloat1(int size)
          Constructor, initialize the number to be size size 1-D array
NslFloat1(NslNumeric1 n)
          Constructor, initialize the value to the same as another NslNumeric1
NslFloat1(java.lang.String name)
          This constructs a number with specified name
NslFloat1(java.lang.String name, float[] d)
          Constructor, copy the contain of array d to the new number
NslFloat1(java.lang.String name, int size)
          This constructs a number with specified name
NslFloat1(java.lang.String name, NslHierarchy curParent)
           
NslFloat1(java.lang.String name, NslHierarchy curParent, int size)
           
NslFloat1(java.lang.String name, NslHierarchy curParent, NslNumeric1 n)
           
NslFloat1(java.lang.String name, NslNumeric1 n)
          This constructs a number with specified name
 
Method Summary
 void duplicateData(NslData n)
          Copy all data from n to this number object.
 NslData duplicateThis()
          Copy itself
 float[] get()
          Get the contain of 1D array in single precision floating point
 float get(int pos1)
           
 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()
          Create a NslDouble1 array with the same value as this array
 NslFloat1 getNslFloat1()
          Get a NslFloat1 array with the same value as this array
 NslInt1 getNslInt1()
          Create a NslInt1 array with the same value as this array
 void getNslSize(NslInt0 size)
          get the size of this array and put it into size
 float[] 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 at the first dimension
 int getSize1()
          get the size of this array at the first dimension
 int[] getSizes()
          get the size of this array
 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(float[] 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 float[] _data
Constructor Detail

NslFloat1

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

NslFloat1

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

NslFloat1

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

NslFloat1

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

NslFloat1

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

NslFloat1

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

NslFloat1

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

NslFloat1

public NslFloat1(java.lang.String name,
                 NslHierarchy curParent,
                 NslNumeric1 n)

NslFloat1

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

NslFloat1

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

NslFloat1

public NslFloat1(java.lang.String name,
                 float[] d)
Constructor, copy the contain of array d to the new number
Parameters:
name - - name of the variable
d - - the value of new number
Method Detail

nslMemAlloc

public void nslMemAlloc(int size)

get

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

get

public float get(int pos1)

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

getNslDouble1

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

getNslFloat1

public NslFloat1 getNslFloat1()
Get 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 float[] 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(float[] 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

getSizes

public int[] getSizes()
get the size of this array
Overrides:
getSizes in class NslNumeric1
Returns:
size of this array in a vector of 4 elements

getNslSize

public void getNslSize(NslInt0 size)
Description copied from class: NslNumeric1
get the size of this array and put it into size
Overrides:
getNslSize in class NslNumeric1
Following copied from class: nslj.src.lang.NslNumeric1
Parameters:
size -  

getSize

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

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)
Description copied from class: NslData
Copy all data from n to this number object. It is used in NslPort and relevant classes only.
Overrides:
duplicateData in class NslData
Following copied from class: nslj.src.lang.NslData
Parameters:
n - - number to be copied
See Also:

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