Difference between revisions of "Array Indices and XY Functions"

From ZCubes Wiki
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 5: Line 5:
 
These functions operate on array locations and values to create contours and other interesting operations.
 
These functions operate on array locations and values to create contours and other interesting operations.
  
[[Array.indices()]]
+
[[Array.indices(SomeFunction,SubtractByArray,ScaleByArray,DoNotShowIndices,SomeRowArray)]]
  
 
Parameters: Function,SubtractByArray,ScaleByArray,DoNotShowIndices,RowArray
 
Parameters: Function,SubtractByArray,ScaleByArray,DoNotShowIndices,RowArray
Line 11: Line 11:
 
Function is applied to array indices at each array location scaled by Scale Array, with SubtractByArray subtracted. Indices can be avoided in output with DoNotShowIndices parameter. RowArray can filter the output.
 
Function is applied to array indices at each array location scaled by Scale Array, with SubtractByArray subtracted. Indices can be avoided in output with DoNotShowIndices parameter. RowArray can filter the output.
  
[[Array.xy()]]
+
[[Array.xy(SomeFunctionArray, SomeOffsetArray, SomeScaleArray, SomeGiveIndicesAlso,SomeDoCentering)]]
  
 
Parameters: (Function, OffsetArray, ScaleArray,GiveIndicesAlso,DoCentering)
 
Parameters: (Function, OffsetArray, ScaleArray,GiveIndicesAlso,DoCentering)
Line 17: Line 17:
  
  
[[Array.xypanel()]]
+
[[Array.xypanel(SomeFunctionArray, SomeOffsetArray, SomeScaleArray, SomeGiveIndicesAlso)]]
  
 
Similar to .xy but with DoCentering as default.
 
Similar to .xy but with DoCentering as default.
  
[[Array.applyat()]]
+
[[Array.applyat(SomeFunction,SubtractByArray,ScaleByArray,DoShowIndices)]]
  
  
Line 29: Line 29:
  
  
[[Array.atnode()]]
+
[[Array.atnode(SomeFunction,SubtractByArray,ScaleByArray,DoNotShowIndices)]]
  
 
Similar to .indices, but just to get the node value.
 
Similar to .indices, but just to get the node value.
Line 39: Line 39:
 
[[Array.nodeindex()]]
 
[[Array.nodeindex()]]
  
Similar to atindex, but just to get the node indices.
+
Similar to atindex, but just to get the node indices. Calls Array.indices(UNDEFINED,UNDEFINED,UNDEFINED,true)
  
[[Array.indicesCore()]]
+
[[Array.indexanddata(SomeFunction,SubtractByArray,ScaleByArray,DoNotShowIndices,SomeRowArray)]]
 +
 
 +
Applies the functions to every element. For each element, the function is passed with indices of the element, and value of the element. Use DoNotShowIndices to hide indices with result.
 +
 
 +
For internal use only.
 +
 
 +
[[Array.indicesCore(UseValuesAtFlag,SomeFunction,SubtractByArray,ScaleByArray,DoNotShowIndices,SomeRowArray)]]
  
 
For internal use only.
 
For internal use only.

Latest revision as of 19:42, 29 July 2024

These functions operate on array locations and values to create contours and other interesting operations.

Array.indices(SomeFunction,SubtractByArray,ScaleByArray,DoNotShowIndices,SomeRowArray)

Parameters: Function,SubtractByArray,ScaleByArray,DoNotShowIndices,RowArray

Function is applied to array indices at each array location scaled by Scale Array, with SubtractByArray subtracted. Indices can be avoided in output with DoNotShowIndices parameter. RowArray can filter the output.

Array.xy(SomeFunctionArray, SomeOffsetArray, SomeScaleArray, SomeGiveIndicesAlso,SomeDoCentering)

Parameters: (Function, OffsetArray, ScaleArray,GiveIndicesAlso,DoCentering) Similar to .indices but gives the indices only if GiveIndicesAlso is asked for.


Array.xypanel(SomeFunctionArray, SomeOffsetArray, SomeScaleArray, SomeGiveIndicesAlso)

Similar to .xy but with DoCentering as default.

Array.applyat(SomeFunction,SubtractByArray,ScaleByArray,DoShowIndices)


Similar to .indices but uses the value at the cell location.

Old name was: Array.at() which is now https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/at


Array.atnode(SomeFunction,SubtractByArray,ScaleByArray,DoNotShowIndices)

Similar to .indices, but just to get the node value.

Array.atindex()

Gets nodes from the indices mentioned.

Array.nodeindex()

Similar to atindex, but just to get the node indices. Calls Array.indices(UNDEFINED,UNDEFINED,UNDEFINED,true)

Array.indexanddata(SomeFunction,SubtractByArray,ScaleByArray,DoNotShowIndices,SomeRowArray)

Applies the functions to every element. For each element, the function is passed with indices of the element, and value of the element. Use DoNotShowIndices to hide indices with result.

For internal use only.

Array.indicesCore(UseValuesAtFlag,SomeFunction,SubtractByArray,ScaleByArray,DoNotShowIndices,SomeRowArray)

For internal use only.