lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [4901] Improve documentation


From: Greg Chicares
Subject: [lmi-commits] [4901] Improve documentation
Date: Tue, 04 May 2010 01:20:48 +0000

Revision: 4901
          http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=4901
Author:   chicares
Date:     2010-05-04 01:20:48 +0000 (Tue, 04 May 2010)
Log Message:
-----------
Improve documentation

Modified Paths:
--------------
    lmi/trunk/ChangeLog
    lmi/trunk/dbvalue.cpp

Modified: lmi/trunk/ChangeLog
===================================================================
--- lmi/trunk/ChangeLog 2010-05-03 23:44:37 UTC (rev 4900)
+++ lmi/trunk/ChangeLog 2010-05-04 01:20:48 UTC (rev 4901)
@@ -25368,3 +25368,19 @@
   ihs_database.cpp
 Revamp database-index class.
 
+20100503T2314Z <address@hidden> [721]
+
+  dbvalue.cpp
+Improve documentation. (The standard library offers no algorithm for
+evaluating polynomials.)
+
+20100503T2344Z <address@hidden> [721]
+
+  dbvalue.cpp
+Render two operator[]() implementations nearly identical.
+
+20100504T0120Z <address@hidden> [720]
+
+  dbvalue.cpp
+Improve documentation.
+

Modified: lmi/trunk/dbvalue.cpp
===================================================================
--- lmi/trunk/dbvalue.cpp       2010-05-03 23:44:37 UTC (rev 4900)
+++ lmi/trunk/dbvalue.cpp       2010-05-04 01:20:48 UTC (rev 4901)
@@ -213,7 +213,14 @@
     return static_cast<int>(n);
 }
 
-//============================================================================
+/// Indexing operator for product editor only.
+///
+/// Two indexing operators are provided. This one's argument includes
+/// the number of durations--which, as far as the product editor is
+/// concerned, is much like the other axes. However, for illustration
+/// production, TDatabase::Query() handles the last (duration) axis,
+/// replicating the last value as required to extend to maturity.
+
 double& TDBValue::operator[](std::vector<int> const& index)
 {
     LMI_ASSERT(e_number_of_axes == index.size());
@@ -228,7 +235,6 @@
             z = z * axis_lengths_[j] + index[j];
             }
         }
-// TODO ?? erase    z *= axis_lengths_.back();
     if(static_cast<int>(data_values_.size()) <= z)
         {
         z = 0;
@@ -242,11 +248,12 @@
     return data_values_[z];
 }
 
-//============================================================================
+/// Indexing operator for illustration production.
+
 double const* TDBValue::operator[](database_index const& idx) const
 {
     std::vector<int> const& index(idx.index_vector());
-
+    LMI_ASSERT(e_number_of_axes == 1 + index.size());
     LMI_ASSERT(e_number_of_axes == axis_lengths_.size());
 
     int z = 0;





reply via email to

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