[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] What is the max value of a node id?

From: ????????????
Subject: Re: [igraph] What is the max value of a node id?
Date: Thu, 25 Apr 2013 23:02:01 +0800

I made some tests by following codes under my environment of Core i7 and Windows Server 2008 R2(64bits):

cout<<sizeof(igraph_integer_t)<<endl; //4
cout<<sizeof(int)<<endl;                     //4
cout<<sizeof(long)<<endl;                   //4
cout<<sizeof(long int)<<endl;               //4
cout<<sizeof(long long)<<endl;            //8

I tried to modify the definition of igraph_integer_t and recompiled igraph, it did not work for large number, neither.
I found that igraph_add_vertices invokes some other functions with parameter of "long int". I think it is not safe to change all the "long int" into "long long", so I give up.

However, I still have questions:

1. Why are the lengths of int, long, and long int all 4 bytes in my environment?

2. even for 4 bytes of igraph_integer_t, why does not igraph_add_vertices work for 25 bits integer such as 33554431 and larger?

------------------ Original ------------------
From:  "Tam??s Nepus"<address@hidden>;
Date:  Thu, Apr 25, 2013 03:47 PM
To:  "Help for igraph users"<address@hidden>;
Subject:  Re: [igraph] What is the max value of a node id?

> Hi, it works fine here, so you'll need to tell us some more info.
A wild guess: could be a difference between 32-bit vs 64-bit platforms; more precisely, the poster may be on a platform where an igraph_integer_t (i.e. a long int) is 4 bytes only, while we are on a platform where it is 8 bytes.


igraph-help mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]