Hi Guys,
I am currently making a serial algorithm for clustering. I start off with a dynamic array using "ALLOCATABLE" and prompt user for a size then use the ALLOCATE() function to allocate the size.
Now, problem is as this is a cluster algorithm, when I start off with say 12 data points and assuming that each 12 points are on their own cluster, after the first run, I will have 11 data points after I merge 2 of them (algorithm says to merge 2 closest data points by weighted average and you keep on doing that until you cant merge any more because remaining clusters have distance greater than the euclidean norm you chose earlier).
Thing is I now gotta update my array I declared earlier of 12 data points with 11 so I can overwrite one of the entry but gotta get rid of the other. So after every run I gotta now replace the existing n*2 array with (n-1)*2 array. Its a 2D array to store x-coordinate and y-coordinate of data points.
Is there anyway Fortran allows for this or any idea how to get around this?
I looked at DEALLOCATE() but that wipes out the entire array which isn't what I need.
Thanks for looking at this.
Cheers.