igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] matrix problem


From: Guilherme Ferraz de Arruda
Subject: Re: [igraph] matrix problem
Date: Mon, 11 Oct 2010 18:15:26 -0300

i did:

   printf("   - Inicializando WAdj ... \t");
  printf("   - dados = %p, dados->i = %ld\n", dados, (long int)dados->i);
  igraph_matrix_init(&w_adj, (long int)dados->i, (long int)dados->i);
  printf("[ OK ]\n");

and got:

dados = 0x7fffd6c02d10, dados->i = 150

dados-> is ok.

i will try to make a little program to show the error, i will send it
in a minute.

Thanks for all


2010/10/11 Gábor Csárdi <address@hidden>:
> On Mon, Oct 11, 2010 at 10:49 PM, Guilherme Ferraz de Arruda
> <address@hidden> wrote:
>> dados is just a struct:
>>
>> typedef struct Matriz{
>>  double** Matriz;
>>  int i, j;
>> }Mat;
>>
>>
>> int CriaRede(igraph_t* grafo, int dist, Mat* dados){
>>  igraph_matrix_t w_adj;
>>
>>  printf("   - Inicializando WAdj ... \t");
>>  igraph_matrix_init(&w_adj, (long int)dados->i, (long int)dados->i);
>>  printf("[ OK ]\n");
>>
>> ...
>>
>> }
>>
>> Is it enough?
>> If its not, i could send all of my code, its dificult to send parts of them.
>
> No, it is not enough. It is best to have some small piece of self
> contained code that we can compile and run, and demonstrates the
> problem. Otherwise one can only make guesses.....
>
> Gabor
>
>> Thanks for all.
>>
>> Guilherme.
>>
>> 2010/10/11 Tamas Nepusz <address@hidden>:
>>> Dear Guilherme,
>>>
>>> Please send a short, self-contained example with which we can reproduce the 
>>> problem. There seems to be nothing wrong with your code at first glance, 
>>> but since we don't know what "dados" is and what's in there, we can't 
>>> really determine what is causing the problem.
>>>
>>> --
>>> Tamas
>>>
>>> On 11 Oct 2010, at 21:22, Guilherme Ferraz de Arruda wrote:
>>>
>>>> Hi,
>>>> I have used:
>>>>
>>>> igraph_matrix_t w_adj;
>>>> igraph_matrix_init(&w_adj, (long int)dados->i, (long int)dados->i);
>>>>
>>>> where dados->i = 151.
>>>>
>>>> But i got Segmentation Fault.
>>>> What is wrong?
>>>>
>>>> i tried to use
>>>> igraph_matrix_init(&w_adj, 151, 151);
>>>>
>>>> and got the same error.
>>>>
>>>> What is wrong?
>>>> it seens to be so simple to have an erros, but i got this error at
>>>> this line by debugging.
>>>>
>>>> Thanks for all.
>>>>
>>>> Guilherme.
>>>>
>>>> _______________________________________________
>>>> igraph-help mailing list
>>>> address@hidden
>>>> http://lists.nongnu.org/mailman/listinfo/igraph-help
>>>
>>>
>>> _______________________________________________
>>> igraph-help mailing list
>>> address@hidden
>>> http://lists.nongnu.org/mailman/listinfo/igraph-help
>>>
>>
>> _______________________________________________
>> igraph-help mailing list
>> address@hidden
>> http://lists.nongnu.org/mailman/listinfo/igraph-help
>>
>
>
>
> --
> Gabor Csardi <address@hidden>     UNIL DGM
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help
>



reply via email to

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