Seed and a User Friendly Backup Program…The first steps

 

My main working computer crashed this weekend – not sure what the problem was, but I thought it might be the monitor. I was running the randomize program and upgrading the MAX_ALLOWED_INT to 1800000, and the system crashed, and would not reboot. An external monitor will let me test to see if it is the monitor. A little later (15 min. of down time), I swapped out my puppy DVD and USB flash drive, and put them into my Suse 9.3 linux box that I had upgraded the memory from 128 MB RAM to 512 MB RAM on. After reinstalling the DVD hardware, it booted right up recognizing the hardware, and looks exactly the same. All programs are there. The only difference I can see is that I now have 1 USB port instead of 2, and the system is slower (the CPU frequency scaling tool from the system menu clocks it as a Pentium III Coppermine running at 498 Mz whereas the other one shows up as a Pentium M 1.73GHz running at a core of 797 Mz). This is the system that boots pretty erratically because of the battery contact, and is much more fragile (can’t be packed in a backpack). With this system, I no longer have windows, or personal internet access because I can’t carry it with me to a wifi source (I can carry the USB flash drives). But overall, I think it is pretty amazing to be able to recover that quickly from a hardware crash, and still have a working system that looks the same (except that it can’t run windows – so no uploads from the camera, no using sonic visualiser or posting to the internet, except through other computers). I could probably fix the camera and sonic visualiser program, but not the portability problem. I think it is really too fragile to carry.

 Anyway, in retrospect, the problem that caused the crash probably lies with the processor, I guess it overheated with upgrading the array to that value, and after everything cooled down, the windows system boots up again. So, the good news is nothing seems to be permanently damaged. Also ran into another system crash when I tried to load devx_sfs with both USB flash drives mounted. It stalled, because everything ran out of memory, the same way that a really big text file with pics won’t load into abiword on this system with the amount of RAM that I have. It might have resolved itself in a million years, but … Works fine after rebooting, running a little less stuff, and using smaller files. The system is really lightning fast, and handles lots and lots of windows really well. I experience difficulty with HUUUGE files, but overall it is more stable than windows XP.

 A little work on programming:

I’ve convinced myself that the original randomize program is probably not skewed, in spite of my initial misgivings. I modified the randomize function by incorporating a seed for the random generator, and also implemented a more modular approach by using functions, and incorporating some pointers. Also, I wrote another modification to the program to perform permutations of randomly generated series. Comparing the bins before and after permutation confirms that nothing is lost. The program runs well for large sets of integers,

sample output for a large set of integers:

 

Enter the number of random numbers you want Enter the maximum value of random number (up to 10000)
 Bin analysis? Type 1 for yes, 0 for no.

 

number of random numbers of type 0:20
number of random numbers of type 1:17
number of random numbers of type 2:15
number of random numbers of type 3:13
number of random numbers of type 4:15
number of random numbers of type 5:23
number of random numbers of type 6:13
number of random numbers of type 7:20
number of random numbers of type 8:22
number of random numbers of type 9:19
number of random numbers of type 10:17
number of random numbers of type 11:14
number of random numbers of type 12:20
number of random numbers of type 13:16
number of random numbers of type 14:25
number of random numbers of type 15:23
number of random numbers of type 16:17
number of random numbers of type 17:13
number of random numbers of type 18:17
number of random numbers of type 19:13
number of random numbers of type 20:14
number of random numbers of type 21:23
number of random numbers of type 22:22
number of random numbers of type 23:24
number of random numbers of type 24:20
number of random numbers of type 25:20
number of random numbers of type 26:18
number of random numbers of type 27:29
number of random numbers of type 28:20
number of random numbers of type 29:15
number of random numbers of type 30:22
number of random numbers of type 31:13
number of random numbers of type 32:16
number of random numbers of type 33:19
number of random numbers of type 34:27
number of random numbers of type 35:20
number of random numbers of type 36:17
number of random numbers of type 37:11
number of random numbers of type 38:23
number of random numbers of type 39:20
number of random numbers of type 40:16
number of random numbers of type 41:16
number of random numbers of type 42:22
number of random numbers of type 43:20
number of random numbers of type 44:21
number of random numbers of type 45:24
number of random numbers of type 46:15
number of random numbers of type 47:21
number of random numbers of type 48:19
number of random numbers of type 49:23
number of random numbers of type 50:12
number of random numbers of type 51:17
number of random numbers of type 52:29
total number of numbers is 1000

 The original array was:7 39 48 36 12 1 5 14 22 29 31 20 34 4 30 34 21 30 2 39 22 51 49 14 31 42 38 27 45 49 20 0 35 15 36 48 17 42 10 40 18 41 7 52 46 38 34 15 16 37 2 38 35 52 52 13 41 38 41 33 34 9 33 17 25 17 12 42 6 23 30 24 12 38 24 5 23 5 20 39 42 23 25 25 22 24 39 10 9 28 44 44 37 25 9 9 42 22 52 49 45 30 21 4 15 46 9 39 51 30 26 41 0 51 14 23 23 0 33 33 28 25 25 12 50 34 22 40 3 21 36 48 51 5 0 14 51 10 1 50 40 27 38 41 26 52 12 49 0 45 29 28 18 1 41 15 36 10 3 39 32 39 35 31 45 35 46 43 45 47 40 33 21 26 22 47 26 34 44 26 27 21 1 45 23 43 8 6 1 11 45 34 51 27 12 43 9 6 34 2 0 21 35 22 48 5 17 21 39 8 47 14 30 49 6 0 40 14 6 42 26 52 23 24 26 36 15 36 42 49 39 42 18 22 11 14 27 29 35 14 37 30 28 14 27 34 15 15 49 21 4 23 20 27 47 47 10 10 31 52 6 17 42 25 40 1 39 14 30 22 28 14 0 4 29 27 38 44 42 35 13 47 6 34 21 0 28 32 11 7 31 18 25 21 43 12 22 30 27 52 52 2 14 52 6 43 27 45 35 17 28 48 11 34 29 33 35 5 12 47 13 44 12 38 12 3 50 34 33 24 34 32 27 48 32 34 39 6 27 22 24 3 17 35 38 47 16 20 0 28 14 13 20 27 52 32 30 49 14 10 21 48 43 49 44 23 31 31 29 5 0 1 9 17 36 47 12 52 15 13 28 29 26 48 4 25 28 34 22 42 44 44 38 35 40 30 5 18 8 35 24 8 36 33 26 20 27 39 19 42 52 48 19 26 43 23 51 18 5 21 8 50 13 47 32 0 25 38 19 33 20 44 42 3 24 15 24 52 1 43 42 0 39 9 26 29 33 25 48 38 47 4 35 7 52 15 8 24 0 28 5 21 20 47 25 45 10 49 44 11 40 34 12 26 43 39 3 23 12 52 9 6 4 44 14 3 7 23 28 8 52 33 29 19 28 2 11 38 51 3 50 39 37 10 12 27 49 16 51 9 15 7 15 19 52 30 22 7 1 51 15 0 32 45 19 7 47 31 46 46 34 44 32 18 1 45 46 51 8 45 7 23 0 23 43 52 1 13 7 2 11 23 2 43 15 22 51 10 0 45 4 35 36 37 1 38 29 47 36 37 39 44 8 40 14 51 40 15 11 47 17 23 17 20 14 33 43 13 43 44 5 48 26 42 32 27 27 8 22 11 46 9 2 2 49 16 1 36 31 13 30 49 36 48 17 50 28 7 10 19 51 16 14 25 5 47 52 33 2 21 44 49 31 46 51 27 10 52 10 42 12 41 38 49 36 3 47 12 10 5 31 8 21 46 34 27 40 33 7 43 2 52 39 33 45 38 8 3 38 18 45 51 7 31 47 43 34 41 3 45 46 34 1 15 27 35 42 15 15 50 5 18 49 45 52 41 30 7 45 16 26 37 14 34 16 8 25 51 50 28 43 43 9 44 6 37 26 48 52 42 45 5 8 41 50 8 30 28 15 23 44 42 7 5 23 24 14 48 22 11 24 13 2 33 5 8 18 32 4 18 22 49 23 30 38 21 38 16 49 1 39 41 44 47 46 15 19 7 11 42 19 35 2 21 16 7 29 34 40 33 52 9 30 23 39 16 44 25 32 41 27 19 29 18 13 23 34 32 31 45 22 50 27 24 18 43 32 47 25 19 28 25 28 5 48 15 21 40 41 1 29 16 20 5 34 34 29 16 14 7 8 36 5 36 8 23 27 40 18 52 7 46 24 36 52 20 52 20 8 40 21 37 4 42 43 38 24 19 2 38 27 10 22 33 46 30 3 21 18 22 20 25 16 45 9 15 13 8 36 21 49 5 5 0 47 49 39 18 16 41 4 43 52 26 24 46 4 27 14 22 50 34 48 13 27 4 29 40 12 12 8 9 17 14 9 12 10 49 30 26 37 35 17 37 9 41 30 13 16 44 35 14 26 30 27 0 35 3 41 48 16 50 4 33 11 14 45 22 10 23 49 48 6 13 32 15 2 9 28 18 1 11 32 27 42 7 28 24 11 16 19 27 13 24 8 25 38 0 48 49 24 44 45 30 4 24 45 6 34 21 25 35 32 5 9 21 12 38 46 23
Bin analysis? Type 1 for yes, 0 for no.

 

number of random numbers of type 0:20
number of random numbers of type 1:17
number of random numbers of type 2:15
number of random numbers of type 3:13
number of random numbers of type 4:15
number of random numbers of type 5:23
number of random numbers of type 6:13
number of random numbers of type 7:20
number of random numbers of type 8:22
number of random numbers of type 9:19
number of random numbers of type 10:17
number of random numbers of type 11:14
number of random numbers of type 12:20
number of random numbers of type 13:16
number of random numbers of type 14:25
number of random numbers of type 15:23
number of random numbers of type 16:17
number of random numbers of type 17:13
number of random numbers of type 18:17
number of random numbers of type 19:13
number of random numbers of type 20:14
number of random numbers of type 21:23
number of random numbers of type 22:22
number of random numbers of type 23:24
number of random numbers of type 24:20
number of random numbers of type 25:20
number of random numbers of type 26:18
number of random numbers of type 27:29
number of random numbers of type 28:20
number of random numbers of type 29:15
number of random numbers of type 30:22
number of random numbers of type 31:13
number of random numbers of type 32:16
number of random numbers of type 33:19
number of random numbers of type 34:27
number of random numbers of type 35:20
number of random numbers of type 36:17
number of random numbers of type 37:11
number of random numbers of type 38:23
number of random numbers of type 39:20
number of random numbers of type 40:16
number of random numbers of type 41:16
number of random numbers of type 42:22
number of random numbers of type 43:20
number of random numbers of type 44:21
number of random numbers of type 45:24
number of random numbers of type 46:15
number of random numbers of type 47:21
number of random numbers of type 48:19
number of random numbers of type 49:23
number of random numbers of type 50:12
number of random numbers of type 51:17
number of random numbers of type 52:29
total number of numbers is 1000
 The array after randomization is:23 46 38 12 21 9 5 32 35 25 21 34 6 45 24 4 30 45 44 24 49 48 0 38 25 8 24 13 27 7 19 16 11 24 28 7 42 27 32 11 1 18 28 9 2 39 15 32 13 6 48 49 23 10 22 45 14 11 33 4 50 48 16 48 41 3 35 0 27 30 26 14 35 44 16 13 30 36 41 9 37 17 35 37 26 30 49 10 12 9 14 17 12 9 8 12 12 40 29 4 27 13 48 34 50 22 14 27 1 4 46 24 26 52 43 4 41 16 18 39 49 47 0 5 5 5 49 21 36 8 13 15 9 45 16 25 20 22 18 21 14 3 30 46 33 22 10 27 38 2 19 24 38 43 42 4 22 37 21 40 8 20 52 20 52 36 24 46 7 52 18 29 40 27 23 8 36 5 36 8 7 14 16 29 34 34 5 31 20 16 29 1 41 40 21 15 48 5 28 25 28 19 25 20 47 32 43 18 24 27 50 22 45 31 32 34 23 13 18 34 29 19 27 41 32 25 44 16 39 23 30 9 52 33 40 4 34 29 7 16 21 2 35 19 42 11 7 19 15 46 30 47 44 41 39 1 49 16 38 21 38 30 23 49 22 18 34 4 32 18 8 5 33 2 13 24 11 22 48 14 24 23 21 5 7 42 44 23 15 28 30 8 50 41 8 5 45 42 30 52 48 26 37 6 44 9 43 43 28 50 51 25 8 16 2 34 14 37 26 16 45 7 30 41 52 45 49 18 5 39 50 15 15 42 35 27 15 1 34 46 45 3 41 34 43 22 47 31 7 51 45 18 38 3 8 38 45 33 39 52 2 51 43 7 33 40 27 34 46 21 8 31 5 10 12 47 3 49 36 49 38 41 12 42 10 52 10 27 51 46 31 49 44 14 21 2 33 52 47 5 25 14 16 51 19 10 7 28 50 31 17 48 36 49 30 13 31 36 1 16 49 2 2 9 42 46 11 22 8 27 27 32 42 26 48 5 44 43 13 43 38 33 14 20 17 23 17 47 11 15 40 51 14 40 8 44 27 39 37 36 47 29 38 1 37 36 35 4 45 0 10 51 45 22 15 43 2 23 11 2 7 13 1 52 43 23 0 23 49 7 45 8 51 46 45 1 18 32 44 34 46 46 31 20 47 7 19 45 32 0 15 51 1 7 22 30 52 19 15 0 7 15 9 51 16 49 27 12 10 37 39 50 3 51 38 35 11 2 28 19 29 33 52 8 28 23 7 3 14 44 4 15 6 9 52 12 23 3 39 43 26 12 34 40 11 44 49 36 10 45 25 47 20 21 5 28 0 24 8 15 52 7 48 35 4 47 38 48 25 33 29 26 9 39 0 42 43 1 17 52 24 15 24 3 42 44 20 33 19 38 25 0 32 47 42 13 50 8 21 5 18 51 23 43 26 19 48 52 42 19 10 39 27 20 26 33 36 8 24 35 8 18 5 30 40 35 40 38 44 44 42 22 34 28 25 4 48 26 29 28 13 18 15 52 12 47 36 17 9 1 0 5 29 31 31 23 44 41 49 43 48 21 10 14 49 30 32 52 27 20 13 14 28 7 0 20 16 47 38 35 17 3 24 22 27 6 39 34 32 52 48 27 32 34 24 33 34 50 3 12 38 12 44 13 47 46 12 5 35 33 29 34 11 48 28 17 35 45 27 43 6 38 52 14 2 52 52 27 30 22 12 43 21 25 18 31 34 7 11 32 28 0 21 34 6 47 13 35 42 44 38 27 15 29 4 0 14 28 22 30 14 39 1 40 25 42 17 6 16 52 31 10 10 47 47 27 20 23 4 21 49 15 15 34 37 27 14 28 30 37 14 35 29 27 14 11 22 18 42 39 2 49 42 36 15 36 26 24 23 52 26 42 6 14 40 38 0 6 49 30 14 47 8 39 21 17 5 48 22 35 21 35 0 2 34 6 9 43 12 27 51 34 45 11 1 6 8 52 43 23 45 1 21 27 26 44 34 26 47 22 26 21 33 52 40 47 45 43 46 35 45 31 35 39 32 39 3 10 36 13 15 41 1 18 28 29 45 0 49 12 52 26 41 38 41 27 40 50 1 10 51 14 0 5 51 48 36 21 3 40 38 22 34 50 12 25 25 28 33 33 0 23 23 14 51 0 41 41 26 30 51 39 9 46 15 4 21 30 45 49 52 22 33 42 9 9 25 37 44 44 28 9 10 39 24 22 25 25 34 23 42 39 20 5 23 5 24 38 12 24 30 23 6 9 42 12 17 25 17 33
Bin analysis? Type 1 for yes, 0 for no.

 

number of random numbers of type 0:20
number of random numbers of type 1:17
number of random numbers of type 2:15
number of random numbers of type 3:13
number of random numbers of type 4:15
number of random numbers of type 5:23
number of random numbers of type 6:13
number of random numbers of type 7:20
number of random numbers of type 8:22
number of random numbers of type 9:19
number of random numbers of type 10:17
number of random numbers of type 11:14
number of random numbers of type 12:20
number of random numbers of type 13:16
number of random numbers of type 14:25
number of random numbers of type 15:23
number of random numbers of type 16:17
number of random numbers of type 17:13
number of random numbers of type 18:17
number of random numbers of type 19:13
number of random numbers of type 20:14
number of random numbers of type 21:23
number of random numbers of type 22:22
number of random numbers of type 23:24
number of random numbers of type 24:20
number of random numbers of type 25:20
number of random numbers of type 26:18
number of random numbers of type 27:29
number of random numbers of type 28:20
number of random numbers of type 29:15
number of random numbers of type 30:22
number of random numbers of type 31:13
number of random numbers of type 32:16
number of random numbers of type 33:19
number of random numbers of type 34:27
number of random numbers of type 35:20
number of random numbers of type 36:17
number of random numbers of type 37:11
number of random numbers of type 38:23
number of random numbers of type 39:20
number of random numbers of type 40:16
number of random numbers of type 41:16
number of random numbers of type 42:22
number of random numbers of type 43:20
number of random numbers of type 44:21
number of random numbers of type 45:24
number of random numbers of type 46:15
number of random numbers of type 47:21
number of random numbers of type 48:19
number of random numbers of type 49:23
number of random numbers of type 50:12
number of random numbers of type 51:17
number of random numbers of type 52:29
total number of numbers is 1000

 

but does not really seem to shuffle well for small sets of say 5 or 6.

sample output for small number of numbers:

 

Enter the number of random numbers you want

 

Enter the maximum value of random number (up to 10000)

 

Enter the values of the 5 numbers you want to randomize:
The 5 numbers are: 1 6 3 4 2
Bin analysis? Type 1 for yes, 0 for no.

 

number of random numbers of type 0:0
number of random numbers of type 1:1
number of random numbers of type 2:1
number of random numbers of type 3:1
number of random numbers of type 4:1
number of random numbers of type 5:0
number of random numbers of type 6:1
number of random numbers of type 7:0
number of random numbers of type 8:0
total number of numbers is 5

 The original array was:1 6 3 4 2
 Bin analysis? Type 1 for yes, 0 for no.

 

number of random numbers of type 0:0
number of random numbers of type 1:1
number of random numbers of type 2:1
number of random numbers of type 3:1
number of random numbers of type 4:1
number of random numbers of type 5:0
number of random numbers of type 6:1
number of random numbers of type 7:0
number of random numbers of type 8:0
total number of numbers is 5
 The array after randomization is:2 4 3 6 1
 Bin analysis? Type 1 for yes, 0 for no.

 

number of random numbers of type 0:0
number of random numbers of type 1:1
number of random numbers of type 2:1
number of random numbers of type 3:1
number of random numbers of type 4:1
number of random numbers of type 5:0
number of random numbers of type 6:1
number of random numbers of type 7:0
number of random numbers of type 8:0
total number of numbers is 5

 

Not sure why, but since this is the application that it will be targeting, I need to optimize this for this application. Nice that it works generally, though. Also, I want to implement command-line arguments (an array) to permute. This will allow me to pipe the output array of a another program into this little program, and pipe out the array directly to a program without saving to a file. I want it to take up to 52 integer arguments, and shuffle them like a card deck.

randomize < 1 2 3 4 5 6 7 8 9 10 11 … 52 > output.save

I already have a version that prompts for the integer values.  Will not post here for the sake of space.

 There is a pretty easy simplification that is used for most permutators (functions used in card games, or other games), it involves throwing back a value if it corresponds to the bin that one already has pulled, since it is more difficult to remap the whole pool to a pool that lacks the value in question. Statistically, I am not sure, but intuitively, I don’t think it is the same. So, I went ahead and did the mapping, so that the value in question is actually removed from the pool. I don’t think it actually matters for the problems that I am thinking of, but I do think that it is a more correct mathematical modeling.

That is:

 

Take 1 object from pool containing 5, save object, take 1 object from pool containing 4, save object, etc. CORRECT.

 

vs.

 

Take 1 object from pool containing 5, save object, replace object in pool so that it now looks like original pool, if 2nd object pulled from pool is same as first, throw back in pool, and pick another one until they are different. CHEATING.

 

Spent some time using Glade to set up an interface for the program that will be the new front-end version of the old program “backup”. I’m going to call it: Daytripper. I could not develop this much further because I couldn’t find the GladetoC converter. Need to look on-line. And need to work on implementinig actions, but will need more support than what I have (a sample file) to do it. Picture.

The code for this “mapping version of randomize”

 

#include<stdio.h>
#include<stdlib.h>
MAX_ALLOWED=10000;

 

/*a program to generate a list of x random integers between 0 and a
given value, permute the values using a “mapping algorithm” vs. a “throw away” algorithm, and analyze the distribution of values submitted by livedoggb 2/21/2012 */
 
main(){

 

   int num, a,c, missing_value_index, n, max, orig_array[MAX_ALLOWED], init_values[MAX_ALLOWED], count[MAX_ALLOWED], temp1[MAX_ALLOWED], temp2[MAX_ALLOWED], values[MAX_ALLOWED];
   int randomize(int num_values, int max_value, int *count, int *init_values);
   int bin_analyze(int max_value, int num, int *init_values, int *count);
   int map(int *temp1, int *temp2, int n, int missing_value_index);
   int permute(int *count);
 

 

 
   printf(“Enter the number of random numbers you want “);
   scanf(“%d”,&n);
 
   printf(“Enter the maximum value of random number (up to %d)”, MAX_ALLOWED);
   scanf(“%d”,&max);
 
/*   printf(“%d random numbers from 0 to %d are :-\n”,n,max);*/
 
   num=n;
   randomize(n, max, count, init_values);
   for (c=1; c<=num; c++){
    orig_array[c]=init_values[c];
   };
   bin_analyze(max, num, init_values, count);
   /* randomize picks n numbers between 0 and max, */
   printf(“\n”);
   a=num;
   while (a>0){
   missing_value_index=randomize(1,n, count, temp2); /*pick 1 # between 0 and n from a set of init_values*/
   /* randomize picks 1 number between 0 and n, and returns
    the value of that position in the array init_values*/
   if (missing_value_index==0){missing_value_index++;};
/*   printf(“\n %d is missing value index before map.\n”, missing_value_index);*/
   map(temp1, init_values, n, missing_value_index); /*take missing_value out of set*/
   values[a]=init_values[missing_value_index];
/*   printf(“picked value is %d \n”, values[a]);
   printf(“The rest of the numbers are:\n”);*/
   for (c=1; c<(n-1); c++) {
/*     printf(“%d “,temp1[c]); */
   }; 
/*   printf(“Init_values array after reassignment should be temp1: “); */
   for (c=1;c<n; c++) {
     init_values[c]=temp1[c];
/*     printf(“%d “, init_values[c]);  */
   };
   n–;
   a–;
};
   printf(“\n The original array was:”);
   for (c=1;c <= num; c++) {
     printf(“%d “, orig_array[c]);
   };
   bin_analyze(max, num, orig_array, count);
   printf(“\n The array after randomization is:”);
   for (c=1;c <= num;c++) {
     printf(“%d “, values[c]);
   };
   bin_analyze(max, num, values, count);
   return 0;
};

 

   int randomize(int n, int max, int *count, int *init_values)
   {
   int r, x, c=0, sd;
   float r_real, rmax=2100598400.0*1.022400;
  
   srand(sd);
   for (c=0; c <=max; c++)
   {
    count[c]=0;
   };
 
   c=1;
   while (c<=n)
 /*  for ( c = 1 ; c <= n ; c++ ) */
   {
   r = random();
   r_real=r;
   x = ((r_real / rmax)*(max+1));
       init_values[c]=x;
          /*count[x]++;*/      
 /*         printf(“%d “,init_values[c]);*/
          c++;
 /*     continue;*/
    };
/*   printf(“\n”);*/
  
   return init_values[1];
};
     
int bin_analyze(int max, int num, int * init_values, int * count)
   {
   int decision=1, c, sum=0;
   printf(“\n Bin analysis? Type 1 for yes, 0 for no.”);
   scanf(“%d”,&decision);
  
   if  (decision == 0) { printf(“no analysis desired.”);}

 

    
   else
   {   
   for (c=0;c<=max;c++) {
    count[c]=0;
   };
   for (c=1; c <=num; c++) {
    count[init_values[c]]++;
   }; 
   sum=0;
      for (c=0; c <=max; c++)
      {
        printf(“number of random numbers of type %d:”, c);
        printf(“%d\n”, count[c]);
        sum = sum + count[c];
       };
      printf(“total number of numbers is %d”, sum);
   };
   return 0;
};

 

int map(int *temp1, int *temp2, int n, int missing_value_index)
   {
 int c;
 for (c=1;c<missing_value_index;c++){
  temp1[c]=temp2[c];
/*  printf(“c, temp1, temp2 are %d, %d, %d \n”, c, temp1[c], temp2[c]); */
 };
 for (c=missing_value_index;c<n;c++){
  temp1[c]=temp2[c+1];
/*  printf(“c, temp1, temp2 are %d, %d, %d, \n”, c, temp1[c], temp2[c]); */ 
 }; 
 /*working array is now temp1*/
 return 0;
    };

 

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s