Changeset 1594 for trunk/Clp


Ignore:
Timestamp:
Aug 28, 2010 8:59:33 PM (9 years ago)
Author:
lou
Message:

Documentation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Clp/src/ClpModel.cpp

    r1541 r1594  
    1010#include <cstdio>
    1111#include <iostream>
     12
     13/*
     14  CLP_NO_VECTOR
     15
     16  There's no hint of the motivation for this, so here's a bit of speculation.
     17  CLP_NO_VECTOR excises CoinPackedVector from the code. Looking over
     18  affected code here, and the much more numerous occurrences of affected
     19  code in CoinUtils, it looks to be an efficiency issue.
     20
     21  One good example is CoinPackedMatrix.isEquivalent. The default version
     22  tests equivalence of major dimension vectors by retrieving them as
     23  CPVs and invoking CPV.isEquivalent. As pointed out in the documention,
     24  CPV.isEquivalent implicitly sorts the nonzeros of each vector (insertion in
     25  a map) prior to comparison. As a one-off, this is arguably more efficient
     26  than allocating and clearing a full vector, then dropping in the nonzeros,
     27  then checking against the second vector (in fact, this is the algorithm
     28  for testing a packed vector against a full vector).
     29
     30  In CPM.isEquivalent, we have a whole sequence of vectors to compare. Better
     31  to allocate a full vector sized to match, clear it (one time cost), then
     32  edit nonzeros in and out while doing comparisons. The cost of allocating
     33  and clearing the full vector is amortised over all columns.
     34*/
    1235
    1336
Note: See TracChangeset for help on using the changeset viewer.