input
stringlengths
10
828
output
stringlengths
5
107
public void add entity tree listener entity tree listener listener tree listeners add listener
add a tree listener
public void remove entity tree listener entity tree listener listener tree listeners remove listener
remove a tree listener
protected void fire entity parent change entity entity entity parent notify listeners for entity tree listener listener tree listeners listener parent changed entity parent notify children for entity child sub entities child fire entity parent change entity parent
notify tree listeners of a change to this entitys parent
private void remove from render technique render component rc render technique rt null int i 0 first find the technique for i 0 i render techniques size i rt render techniques get i if rc get render technique name equals rt get name rt remove render component rc break if i render techniques size logger warning error render technique not found
add the given render component to the appropriate render technique
public void commit processor arming collection collection if state running p null p get geometry set local translation position x position y position z p get geometry set local rotation rotation clone p get geometry set local scale penetration world manager add to update list p get geometry
the commit methods
public void apply to geometry geometry geo shader state set attribute pointer binormal 3 false 0 geo get binormal buffer shader state set attribute pointer tangent 3 false 0 geo get tangent buffer shader state set uniform diffuse map index 0 shader state set uniform normal map index 1 geo set render state shader state
this applies this shader to the given geometry
public void set engine random element engine this engine engine
setter for property engine
public void disperse int parent x int parent y throws java lang exception this x parent x this y parent y point best pt this search from parent x parent y landscape put agent at int best pt get x int best pt get y this
used by fledgling pair to disperse to its new lication
public void step try test my survival if survival next boolean stage dead else test my reproduction if reproduction next boolean for int i 0 i clutch size i the fledgling attempts to disperse if it fails there is and exception thrown and it is returned to the pool pair fledge pair pool borrow object try fledge disperse x y catch exception ex pool return object fledge increase my age current age catch exception e log error e get message e
step iterates this agent behaviors this agent will perform are executed here
public landscape get landscape return this landscape
getter for property landscape
public void set current age int current age this current age current age
setter for property current age
public void set landscape landscape landscape this landscape landscape
setter for property landscape
public double get survival probability return survival get success probability
getter for property survival probability
public object get resource at int x int y try return habitat grid get object at x y catch java lang array index out of bounds exception aobe system err println landscape get resource at bad coordinate x x y y aobe print stack trace return null
this gets the resource object available at a x y coordinate
public void begin log debug begin add the neccessary events to the schedule these setup to occur in the order they are added schedule schedule action at interval 1 0 this step schedule last schedule schedule action at max iterations this stop schedule last schedule schedule action at interval 1 0 new basic action public void execute if landscape get agents size 1 stop schedule last
model begins from this method
public void set survival probability double success probability survival set success probability success probability
setter for property survival probability
public double get resource value at int x int y double value double na n try value habitat grid get value at x y catch java lang array index out of bounds exception aobe system err println landscape get resource value at bad coordinate x x y y aobe print stack trace return value
this gets the resource double value available at a x y coordinate
public void disperse from int parent x int parent y this x parent x this y parent y point best pt this search try if best pt null landscape put agent at int best pt get x int best pt get y this else landscape get reaper queue add this catch exception e log error e get message e
used by fledgling pair to disperse to its new lication
public int get clutch size return clutch size
getter for property clutch size
public void set clutch size int clutch size this clutch size clutch size
setter for property clutch size
public double get reproduction probability return reproduction get success probability
getter for property reproduction probability
public void set reproduction probability double success probability reproduction set success probability success probability
setter for property reproduction probability
public int get size x return habitat grid get size x
getter for property size x
public int get search time return search time
getter for property search time
public int get size y return habitat grid get size y
getter for property size y
public double get survival probability if survival generator null return survival generator get success probability return 1
getter for property survival probability
public void set search time int search time this search time search time
setter for property search time
public array list get agents return this agents
getter for property agents
public void set survival generator edu cornell lassp houle rng pack random element random generator survival generator new bernoulli 1 0 random generator
setter for property survival generator
public object2 dgrid get habitat grid return this habitat grid
getter for property habitat grid
public int get pair clutch size return this pair clutch size
getter for property pair clutch size
public object2 dgrid get agent grid return this agent grid
getter for property agent grid
public void draw sim graphics g g draw fast round rect new color color hsbto rgb current age float 05 float 1 0 float 1 0
used by the gui to draw this agent on the landscape grid
public vector get birth queue return this birth queue
getter for property birth queue
public double get max iterations return this max iterations
getter for property max iterations
public double get current dispersal dist return this current dispersal dist
getter for property actual disperal
public vector get reaper queue return this reaper queue
getter for property reaper queue
public void set max iterations double max iterations this max iterations max iterations
setter for property max iterations
public double get reproduction probability if reproduction generator null return reproduction generator get success probability return 1
getter for property reproduction probability
public object pool get pool return this pool
getter for property pool
public void set pair clutch size int pair clutch size this pair clutch size pair clutch size
setter for property pair clutch size
public void set pool object pool pool this pool pool
setter for property pool
public void set reproduction generator edu cornell lassp houle rng pack random element random generator reproduction generator new bernoulli 1 0 random generator
setter for property reproduction generator
public void step log debug step get the variation occuring this iteration current iteration survival iteration survival distribution next double
this method is defined in the stepable interface it is scheduled
public int get pair search time return this pair search time
getter for property pair search time
public void draw display sim graphics g if view return without synchronization get lots of concurrent modification errors drawable d null array list t synchronized obj list t array list obj list clone list iterator li t list iterator while li has next d drawable li next g set drawing coordinates mapping get screen x d mapping get screen y d 0 d draw g
displays the context
public array list get objects at int x int y array list objects new array list obj list iterator i objects iterator while i has next object a i next int a x mapping get screen x a int a y mapping get screen y a dimension d mapping get size a rectangle r new rectangle new point a x a y d if r contains x y i remove return objects
gets the object at the specified screen coordinates for probing
public void set char array char char array this char array char array
setter for property char array
public void set pair search time int pair search time this pair search time pair search time
setter for property pair search time
public void set byte array byte byte array this byte array byte array
setter for property byte array
public void set dispersal angle generator edu cornell lassp houle rng pack random element random generator this angle generator new uniform 0 1440 random generator
setter for property dispersal distance
public void set byte object array byte byte object array this byte object array byte object array
setter for property byte object array
public double get pair mean dispersal distance return this pair mean dispersal distance
getter for property pair mean dispersal distance
public void set char object array character char object array this char object array char object array
setter for property char object array
public double get actual dispersal dist return this actual dispersal dist
getter for property actual disperal
public int get neighborhood size int extent boolean include origin return int 2 math pow extent 2 2 extent include origin 1 0
this method actually uses the following calculation to determine the number
public void set pair mean dispersal distance double pair mean dispersal distance this pair mean dispersal distance pair mean dispersal distance
setter for property pair mean dispersal distance
public int get neighborhood size int extent boolean include origin return int math pow 2 extent 1 2 include origin 0 1
this method actually uses the following calculation to determine the number
public int get neighborhood size int extent boolean include origin return int 3 math pow extent 1 2 3 extent 1 include origin 1 0
this method actually uses the following calculation to determine the number
public void set int object array integer int object array this int object array int object array
setter for property int object array
public int get model initial pairs return this model initial pairs
getter for property model initial pairs
public void set model initial pairs int model initial pairs this model initial pairs model initial pairs
setter for property model initial pairs
public void set double object array double double object array this double object array double object array
setter for property double object array
public int get pair survival seed return this pair survival seed
getter for property pair survival seed
public void set long array long long array this long array long array
setter for property long array
public void set long object array long long object array this long object array long object array
setter for property long object array
public void set pair survival seed int pair survival seed this pair survival seed pair survival seed
setter for property pair survival seed
public void clear int x int y location c location matrix get x y if c null c clear
clears the contents the specified cell
public discrete2 dlocation get location at int x int y abstract2 dlocation cell abstract2 dlocation get matrix get xnorm x ynorm y if cell null try cell abstract2 dlocation loc class new instance cell x xnorm x cell y ynorm y cell space this catch instantiation exception e1 todo auto generated catch block e1 print stack trace catch illegal access exception e2 todo auto generated catch block e2 print stack trace return cell
gets the discrete2 dlocation object at the specified coordinates
public void set short array short short array this short array short array
setter for property short array
public int get location size at int x int y location c location this matrix get xnorm x ynorm y if c null return c size return 0
gets the size number of occupants of the cell at
public int get index of int x int y object obj location c location this matrix get xnorm x ynorm y if c null return c get list index of obj return 1
gets the index of the specified object at the specified location
public int get pair reproduction seed return this pair reproduction seed
getter for property pair reproduction seed
public iterator get iterator at int x int y return this get location at xnorm x ynorm y iterator
gets the iterator for the collection of objects at the specified
public void set short object array short short object array this short object array short object array
setter for property short object array
public list get objects at int x int y return this get location at xnorm x ynorm y get list
gets the list of objects at the specified coordinates
public void add object o elements add o if o instanceof agent agent o set location this
adds an object to this cell
public void set float array float float array this float array float array
setter for property float array
public void set pair reproduction seed int pair reproduction seed this pair reproduction seed pair reproduction seed
setter for property pair reproduction seed
public void insert int index object o if elements is empty space get matrix put x y this array list elements add index o if o instanceof agent agent o set location this
inserts the specified object at the specified index
public object remove int index object o array list elements remove index if o instanceof agent agent o set location null if elements is empty space get matrix remove x y return o
removes the object at the specified index
public void add object o if elements is empty this clear super add o
adds an object to this cell
public void set float object array float float object array this float object array float object array
setter for property float object array
public int get pair dispersal seed return this pair dispersal seed
getter for property pair dispersal seed
public void put object at int x int y object object this get location at xnorm x ynorm y add object
puts the specified object into the cell at the specified coordinates
public void remove object at int x int y object obj this get location at xnorm x ynorm y remove obj
removes the specified object from the specified location
public void trim for int i 0 i get size x i for int j 0 j get size y j int count get location size at i j if count 0 get matrix remove i j get matrix trim
releases any superfluous memory
public void set pair dispersal seed int pair dispersal seed this pair dispersal seed pair dispersal seed
setter for property pair dispersal seed
public void diffuse prev y end y y 0 while y end y next y y 1 compute row prev y y y next y next y 0 compute row copies the write matrix into the read matrix update
runs the diffusion with the current rates and values
public void put object at int x int y object object if object instanceof java lang number get matrix put xnorm x ynorm y object else throw new class format error object must be of type java lang number
puts the specified object at x y
public void update double a matrix write matrix get data double b matrix read matrix get data system arraycopy a matrix 0 b matrix 0 a matrix length
copies the write lattice to the read lattice
public void add object o if size capacity capacity unbounded if elements is empty space get matrix put x y this elements add o if o instanceof agent agent o set location this else todo improve this in the cell interface so that capacity limit can tested for with a unique exception throw new array index out of bounds exception location is fully occupied
adds an object to this cell
public void remove object o elements remove o if o instanceof agent agent o set location null if elements is empty space get matrix remove x y
removes the specified object from this cell
public void set boolean object array boolean boolean object array this boolean object array boolean object array
setter for property boolean object array
public string get age survival table return string utils mush age survival table
getter for property survival table
public void set age survival table string table this age survival table string utils chop table
setter for property survival table
public void set bar bar bar this bar bar
setter for property bar
public string get age reproduction table return string utils mush age reproduction table
getter for property survival table
public void set age reproduction table string table this age reproduction table string utils chop table
setter for property survival table
public location get cell at int x int y location cell location get matrix get xnorm x ynorm y if cell null cell new object2 dlocation this xnorm x ynorm y return cell
gets the location object at the specified coordinates