Sunday, 15 May 2011

indexing - Julia Find Index of Iterative Value -


I'm trying to find an item's pointer in an array in which an item from the item There is a step in Is there a function that enables me to do this?

  dim = 3 length = 10 arrayTuple = fill! (Array (Int64, dim), Length) # [10,10,10] RR = Fill! (Array (Int 6, Tupal ...), 1) AR # print the item in the node index for the end of the array  

IIUC, you can use:

  julia & gt; Enumerate (I, item) for (AR [1: 5]) println (i, "", item) end 1 1 2 1 3 1 4 1 5 1  

If you The multi-dimensional version you want, you can use instead:

  julia & gt; In each index (A) printen (i, "", [i]) and base. Iterator MD Cartesian Index (1, 1) 1.0 Base. EshtersMD Cartesian Index (2,1,1) 1.0 Base. Internetnamesmd CartesianIndex_3 (3,1,1) 1.0 Base.InternersMD.Cartion Index_3 (1,2,1) 1.0 [... and similar]  

No comments:

Post a Comment