The output of the program with the sample dataset I gave in the previous thread is:
cancer-1->breast cancer cancer-1->lung cancer cancer-1->heart cancer cancer-1->stomach cancer cancer-4->foot cancer cancer-1->blood cancer breast cancer-1->foot cancer breast cancer-1->some cancer lung cancer-1->foot cancer lung cancer-2->some cancer lung cancer-1->blood cancer heart cancer-1->foot cancer heart cancer-1->some cancer stomach cancer-1->foot cancer stomach cancer-1->some cancer foot cancer-1->some cancer blood cancer-1->some cancer
As you can see, I am trying to create transitive relationships, ie, If A->B, and B->C, then A->C. But I am also giving weight to the relationships, ie, if A->D, and D->C, then again A->C. So the relation [valueof{A}][valueof{C}]=2---->ie 1+1, because the relation was created twice.

In reply to Re^4: out of memory problem by perlbeginner10
in thread out of memory problem by perlbeginner10

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.