Aaron Wong avatar Aaron Wong committed d103626

Add documentation to Quantize method; modify BNUnraveler

Comments (0)

Files changed (2)

 	m_fQuantized = true;
 }
 
+
+/*!
+ * \brief
+ * Return the discretized form of the given value using the data pair's current bin edges, or
+ * return the provided missing data value.
+ *
+ * \param dValue
+ * Continuous value to be discretized.
+ * 
+ * \returns
+ * Discretized version of the given value, less than GetValues; -1 if the given value is not finite, or
+ * if either gene does not exist in dataset
+ * 
+ * Discretizes a given continuous value using the data pair's bin edges.  Standard usage is:
+ * \code
+ * DP.Quantize( DP.Get( i, j, 0 ) );
+ * \endcode
+ * 
+ * \see
+ * SetQuants | CMeta::Quantize
+ */
+
+
 size_t CDataPair::Quantize( size_t iY, size_t iX, size_t iZero ) const {
     float d;
     if( iY == -1 || iX == -1 ) {

tools/BNUnraveler/BNUnraveler.cpp

 				continue;
 			if( psData->m_pAnswers && CMeta::IsNaN( psData->m_pAnswers->Get( i, j ) ) )
 				continue;
-			if( ( iOne == -1 ) || ( iTwo == -1 ) ||
-				( ( iBin = psData->m_pDat->Quantize( psData->m_pDat->Get( iOne, iTwo ) ) ) == -1 ) )
-				iBin = psData->m_iZero;
+
+			iBin = psData->m_pDat->Quantize( iOne, iTwo, psData->m_iZero );
 			if( iBin == -1 )
 				continue;
+
 			if( CMeta::IsNaN( adYes[ iIndex = ( j - i - 1 ) ] ) ) {
 				adYes[ iIndex ] = dYes;
 				adNo[ iIndex ] = dNo; }
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.