Algorithm-PageRank-XS

 view release on metacpan or  search on metacpan

ppport.h  view on Meta::CPAN

PerlIO_flush||5.007003|
PerlIO_get_base||5.007003|
PerlIO_get_bufsiz||5.007003|
PerlIO_get_cnt||5.007003|
PerlIO_get_ptr||5.007003|
PerlIO_read||5.007003|
PerlIO_seek||5.007003|
PerlIO_set_cnt||5.007003|
PerlIO_set_ptrcnt||5.007003|
PerlIO_setlinebuf||5.007003|
PerlIO_stderr||5.007003|
PerlIO_stdin||5.007003|
PerlIO_stdout||5.007003|
PerlIO_tell||5.007003|
PerlIO_unread||5.007003|
PerlIO_write||5.007003|
Perl_signbit||5.009005|n
PoisonFree|5.009004||p
PoisonNew|5.009004||p
PoisonWith|5.009004||p
Poison|5.008000||p

ppport.h  view on Meta::CPAN

vwarner||5.006000|
vwarn||5.006000|
wait4pid|||
warn_nocontext|||vn
warner_nocontext|||vn
warner|5.006000|5.004000|pv
warn|||v
watch|||
whichsig|||
write_no_mem|||
write_to_stderr|||
xmldump_all|||
xmldump_attr|||
xmldump_eval|||
xmldump_form|||
xmldump_indent|||v
xmldump_packsubs|||
xmldump_sub|||
xmldump_vindent|||
yyerror|||
yylex|||

table.c  view on Meta::CPAN

#endif
#ifndef MAX
#define MAX(A, B)  ((A) > (B)) ? (A) : (B)
#endif

Array * array_init(float value)
{
        Array * result;

        if ((result = (Array *)malloc(sizeof(Array))) == NULL) {
                fprintf(stderr, "Memory error\n");
                exit(2);
        }

        if ((result->data = (NUM *)malloc(sizeof(NUM))) == NULL) {
                fprintf(stderr, "Memory error\n");
                exit(2);
        }

        result->data[0] = value;
        result->len = 1;
        return result;
}

void array_print(FILE * file, Array * arr)
{

table.c  view on Meta::CPAN


        return 0;
}


Array * array_push(Array * input, float value)
{
        input->len++;
        input->data = (NUM *) realloc(input->data, input->len * sizeof(NUM));
        if (input->data == NULL) {
                fprintf(stderr, "Memory error\n");
                exit(2);
        }
        input->data[input->len - 1] = value;
        return input;
}

int array_error()
{
        fprintf(stderr, "Array out of bounds!\n");
        exit(3);
}

int  array_delete(Array * array)
{
        if (array == NULL)
                return 1;

        if (array->data != NULL)
                free(array->data);

table.c  view on Meta::CPAN

}

void _table_expand(Table *tb, unsigned int i);

Table * table_init()
{
        Table * result;

        result = (Table *)malloc(sizeof(Table));
        if (result == NULL) {
                fprintf(stderr, "Memory error\n");
                exit(2);
        }

        result->order = 1;
        result->capacity = result->order = 0;
        result->rows = (Array **)malloc(sizeof(Array *));
        if (result->rows == NULL) {
                fprintf(stderr, "Memory error\n");
                exit(2);
        }
        result->rows[0] = NULL;

        _table_expand(result, 999);
        result->order = 0;

        return result;
}

table.c  view on Meta::CPAN


void _table_expand(Table *tb, unsigned int i)
{
        unsigned int j;

        if (i < tb->capacity)
                return;

        tb->rows = (Array **)realloc(tb->rows, (i + 1) * sizeof(Array *));
        if (tb->rows == NULL) {
                fprintf(stderr, "Memory error\n");
                exit(2);
        }

        for (j = tb->order; j <= i; j++) {
                tb->rows[j] = NULL;
        }

        tb->capacity = tb->order = i + 1;
}



( run in 0.517 second using v1.01-cache-2.11-cpan-49f99fa48dc )