Search:

Type: Posts; User: brewbuck

Search: Search took 0.08 seconds.

  1. Replies
    3
    Views
    2,531

    Yes, but do this only once up front, not every...

    Yes, but do this only once up front, not every time you access a matrix element. Of course, if the strings are being generated dynamically and handed to you, you can't do that. But if you're given a...
  2. Replies
    3
    Views
    2,531

    std::map< string, int > to map from strings to...

    std::map< string, int > to map from strings to row/column indices. You then look up via:



    double value = data[ rowMap[ rowName ] * colMap.size() + colMap[ colName ] ];


    But if "efficiency"...
Results 1 to 2 of 2