Hello,
I'm generating text files using C and prefer to use notepad to open the results. Whenever something uses and escape character (eg "\n"), notepad will display a box character. When I open...
Type: Posts; User: firetheGlazer
Hello,
I'm generating text files using C and prefer to use notepad to open the results. Whenever something uses and escape character (eg "\n"), notepad will display a box character. When I open...
Hello,
I'm working with a large data set and was wondering if there were some statistical shortcuts. I'm trying to compute the mode of a data set and can only think of an O(n^2) solution....
Right on the money there! Sure enough, after looking through my data (quicksorted for ease of use), there were 7 or 8 'inf's. Is there an explicit way to test for if a value is inf? I'm going to use...
My average is actually non-existent when I run this. Using an U L L int yields a bunch of 0s. When I use doubles, I get 'inf'. I need to use the average later to get a nice histogram, but since the...
Hi,
I'm working with a very large number of doubles, each with a value between 0 and around 10. I'm not sure of the best implementation to get around floating point precision so that I can take a...
Hello,
I've got an array of doubles and wrote a simple comparison function, but when I run, my array remains unsorted. Your help is appreciated.
double moment [1001];
...
void *func =...
Wow, okay thanks for the catch. When I put in a continue, GDB spit out my assignment line with a segfault:
Program received signal SIGSEGV, Segmentation fault.
0x00401758 in main () at...
I have a looping statement to read through all of the array:
for(j=0;j<maxIndex;j++)
{
if(momentBin[j]==NULL)
break;
test =(momentBin[j])->val;
...
Hi. I'm working with dynamic arrays to construct a histogram. I've got an array of pointers to my histogram struct and I try to malloc() and then realloc() the array as necessary. Here's some of the...
Linux Server w/ 24gb ram. I think I'll be okay
okay, thanks guys. I also managed to find out that the maximum size of a static array is somewhere around 181*1711*1711*sizeof(int). Unfortunately it may be too small. Oh well, I'll figure something...
Here's the code before it segfaults:
//Tester file to deal with segFault
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <time.h>
if I made it static, I take it I'd have to hard code it's size?
Okay, I managed to get a stack overflow locally, which means that the program is working correctly (hopefully).
here's the error I get on the server, and I'm not sure exactly why:
Assignment...
Hi,
I have some code with a large 3d array. I'm trying to run this on a server running linux because I will get more memory than my pc (24gb RAM). When I run it on the server, I get a segfault...
I'd love to do that, but unfortunately, my test sample size is designed to generate data from 4000 points. Ideally, if my code works, I'll move up to 40,015 or perhaps 41,000 if I need that much....
Hello,
I put on an earlier post about using linked lists for data, but I've seen the error of my ways (and the limited RAM which I tried to employ). What I would like to do now is read and...
Hello,
I'm writing a program to look at very large data sets. When I wrote the program to use a 3-d linked list, the thing did not finish over 3 days. I'd like to use arrays to take advantage of...