You don't say how you're going to populate the lower triangle of the matrix, so it is quite difficult to figure out any solution.

The bottom line is this: can you just read and process one row at a time? If you can, just do it. I'm dealing almost daily with files too large to fit into memory. Most of the time, I get around by reading and processing them one record at a time. But every now and then, it gets more complicated: in such circumstances, there is often no general solution; the possible solution (or solutions) is specific to the problem at hand.

If you can't process your file line by line, then you'll have to tell us why and be much more specific about what you're trying to do exactly. Some of us might be able to suggest another solution.


In reply to Re: upper or lower triangular matrix to full by Laurent_R
in thread upper or lower triangular matrix to full by savita

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.