Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

word stores

Name: Anonymous 2011-09-18 22:46

a better dictionary?


const charVal[30]={"!+-recognise these chars*/();.,?"};
struct s_chNode{int ID, extendID, byVal, branch, chleaf, unileaf;};

struct s_uniNode{int ID, extendID, byVal, branch, leaf;};


s_chNode is used as a plain old trie... Until it reaches a specified length (2-5 chars?) where the chain of chars being added becomes redundant... Eg Adding 'Abc' to 'Abc'

Then s_uniNode takes over (a First order Nest?), which allows for 'partial' prefix & suffix compression?
Each uniNode can point to a previous uniNode or Null/Empty, like chNodes, but also points to a chNode, which might be as many as five? chars at once...

Name: n7ix.c 2011-09-19 18:06


#include <stdio.h>
#include <stdlib.h> // atoi()
#include <math.h> // pow()
 
int main(int argc, char* argv[])
{
  int i, count=0;
  double f, sum=0.0, prod=1.0, resum=0.0;
 
  for (i=1; i<argc; ++i) {
    f = atof(argv[i]);
    count++;
    sum += f;
    prod *= f;
    resum += (1.0/f);
  }

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List