User Tools

Site Tools


dev:program_ulam

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
dev:program_ulam [2015/07/07 13:56] – [EventWindow Indices] xychendev:program_ulam [2016/01/14 07:13] (current) ackley
Line 21: Line 21:
 ==== EventWindow Indices ==== ==== EventWindow Indices ====
  
 +{{ :dev:event-window-10.png?300|}} The image at right (click to enlarge) shows the indexing scheme used for sites within an ''EventWindow'' Both 2D 'coord' numbering and a 1D 'site number' approach are offered.  
  
 +The ''getCoord(siteNum)'' function converts an 1D index (which is an ''Unsigned(6)'' ) to a 2D coordinate (which is a quark ''C2D''). The ''getSiteNumber(coord)'' convert ''C2D'' back to 1-d ''Unsigned(6)'' The quark ''C2D'' has ''getX()'' and ''getY()'' methods to access the //x// and //y// coordinate values individually.
 +
 +In general, when code is referring to individual fixed sites within the event window, the 1D coordinate system is used (see the 'First' element below for an example).  Two-dimensional C2D indexing is more commonly used when there is some flexibility depending on geometry or relative positions.  
  
  
Line 32: Line 36:
   EventWindow ew;   EventWindow ew;
   Void behave(){   Void behave(){
-    ew[1]=ew[0];+    ew[1]=ew[0]; // Copy self one site west
   }   }
 } }
Line 425: Line 429:
 In the ''changeColor()'' of this ''Node'' element, we use ''ARGB getColor()'' to give new color values. This ''getColor()'' returns a array with Four values: //Opacity//, //Red//, //Green// and //Blue//.   In the ''changeColor()'' of this ''Node'' element, we use ''ARGB getColor()'' to give new color values. This ''getColor()'' returns a array with Four values: //Opacity//, //Red//, //Green// and //Blue//.  
  
-Like other Neurons, our ''Node'' will be fired by neighbors. In this simplified case, only the //left neighbors// can trigger our ''Nodes''. This time we need to scan the whole ''EventWindow''. To decide which neighbors are located to the left, a 2-dimensional coordinate will be more convenientWe assign //(x,y)// coordinate to each site of the ''EventWindow'' instead of the 1-dimensional index from 0 to 40. We noticed the index numbers from 5 to 40 are different from the old version MFM simulator. It's better to start using this new //site map// now. The ''EventWindow.getCoord(siteNum)'' converts 1-dimensional index to 2-dimensional coordinates. The quark ''C2D'' has ''getX()'' and ''getY()'' to interpret the //(x,y)// better.+Like other Neurons, our ''Node'' will be fired by neighbors. In this simplified case, only the //left neighbors// can trigger our ''Nodes''. This time we need to scan the whole ''EventWindow''. To decide which neighbors are located to the left we use C2D coordinate. Those Atoms with negative x coordinate are to the left of our ''Node''
  
-{{:dev:ew_indx2d.png?280|}}    
dev/program_ulam.1436277388.txt.gz · Last modified: 2015/07/07 13:56 by xychen