Monthly Archives: October 2009

opensuse

Advertisements

Posted in Kategorizálatlan | Leave a comment

Image with multi_for

         // Create an Image (320,200)          int Width = 320; int Height = 200;          using (Bitmap Image = new Bitmap(Width, Height, System.Drawing.Imaging.PixelFormat.Format24bppRgb))          {               Algorithm.multi_for(new ulong[] { (ulong)Width, (ulong)Height }, delegate(ArraySegment<ulong> Indices)              {                  var Ix = (int)Indices.Array[Indices.Offset];                  var Iy = … Continue reading

Posted in C# | Leave a comment

C# Multifor, Dynamic count of nested loops

   public static class Algorithm    {        public delegate void OnIndexDelegate(ArraySegment<ulong> Indices);         public static void multi_for(ulong[] IterationCounts, OnIndexDelegate OnIndex)        {                       ulong v = (ulong)IterationCounts.Length +1;            ulong[] radix = new ulong[v];            radix[0] = 2;            ulong[] num   = new ulong[v];             … Continue reading

Posted in C# | Leave a comment

Multi For, part2 : Dynamic count of nested loops without recursion?

‘———————————————————————————————– Sub multi_for(IterationCounts) Dim u: u = 0 Dim v: v = UBound(IterationCounts) – LBound(IterationCounts) + 1 – 1 Dim radix() Dim num() ReDim radix(v + 1) ReDim num(v + 1) ‘— +1 = ready flag Dim Ix: For Ix … Continue reading

Posted in vbscript | Leave a comment

Multi For : Dynamic count of nested loops without recursion?

Dim u : Dim v : Dim m u=0 : v=2 : m=v-u+1 ‘D = 1 digit permutation (0 nested loop) for ix = u to v msgbox ix mod m next Results: [0] [1] [2] ‘======================= ‘D = 2 … Continue reading

Posted in vbscript | Leave a comment