コード例 #1
0
void QuantitationRatio::printDelimitedLine2 ( ostream& os, const DoubleVectorVector& dvv, DoubleVectorVectorSizeType peakNumber ) const
{
	for ( int i = 0 ; i < dvv.size () ; i++ ) {
		if ( ok [i][peakNumber] ) delimitedCell ( os, dvv [i][peakNumber], 0 );
		else delimitedEmptyCell ( os );
	}
}
コード例 #2
0
void QuantitationRatio::printHTMLLine2 ( ostream& os, const DoubleVectorVector& dvv, DoubleVectorVectorSizeType peakNumber, const string& styleID ) const
{
	for ( int i = 0 ; i < dvv.size () ; i++ ) {
		if ( ok [i][peakNumber] ) tableCell ( os, dvv [i][peakNumber], 0, false, styleID );
		else tableEmptyCell ( os, styleID );
	}
}
コード例 #3
0
void QuantitationRatio::printDelimitedLine4 ( ostream& os, const DoubleVectorVector& ratio, const CharVectorVector& ratioType, DoubleVectorVectorSizeType peakNumber ) const
{
	for ( int i = 0 ; i < ratio.size () ; i++ ) {
		if ( ok [0][peakNumber] && ok [i+1][peakNumber] && quanPep )
			printDelimitedRatio ( os, ratio [i][peakNumber], ratioType [i][peakNumber] );
		else
			delimitedEmptyCell ( os );
	}
}
コード例 #4
0
void QuantitationRatio::printDelimitedLine3 ( ostream& os, const DoubleVectorVector& dvv, DoubleVectorVectorSizeType peakNumber ) const
{
	for ( int i = 0 ; i < dvv.size () ; i++ ) {
		if ( ok [0][peakNumber] && ok [i+1][peakNumber] && quanPep )
			delimitedCellSigFig ( os, dvv [i][peakNumber], 4 );
		else
			delimitedEmptyCell ( os );
	}
}
コード例 #5
0
void QuantitationRatio::printHTMLLine4 ( ostream& os, const DoubleVectorVector& ratio, const CharVectorVector& ratioType, DoubleVectorVectorSizeType peakNumber, const string& styleID ) const
{
	for ( int i = 0 ; i < ratio.size () ; i++ ) {
		if ( ok [0][peakNumber] && ok [i+1][peakNumber] && quanPep )
			printHTMLRatio ( os, ratio [i][peakNumber], ratioType [i][peakNumber], styleID );
		else
			tableEmptyCell ( os, styleID );
	}
}
コード例 #6
0
ファイル: dbscan.cpp プロジェクト: 418231020/fire-cbir
set<uint> DBSCAN::neighborhood(const DoubleVectorVector& inputdata, uint startObjectID) {
  set<uint> result;
  uint nOfObjects=inputdata.size();
  for(uint i=0;i<nOfObjects;++i) {
    if(distance(inputdata,i,startObjectID)<=epsilon_) {
      result.insert(i);
    }
  }
  return result;
}
コード例 #7
0
CosSimilarityList::CosSimilarityList ( const StringVector& formulaString, int charge, const DoubleVectorVector& intensity, const DoubleVectorVector& area, int numQuanStates ) :
	csi ( numQuanStates, -100.0 ),
	csa ( numQuanStates, -100.0 )
{
	for ( int i = 0 ; i < numQuanStates ; i++ ) {
		CosSimilarity cs ( formulaString [i], charge, i < intensity.size () ? intensity [i] : DoubleVector (), i < area.size () ? area [i] : DoubleVector () );
		csi [i] = cs.getIntensity ();
		csa [i] = cs.getArea ();
	}
}
コード例 #8
0
ファイル: dbscan.cpp プロジェクト: 418231020/fire-cbir
void DBSCAN::run(const DoubleVectorVector& inputdata, ResultVector &clusterInformation){

  DBG(25) << "Init ...";
  uint nOfObservations=inputdata.size();
  distanceTable_=DoubleVectorVector(nOfObservations);
  for(uint i=0;i<nOfObservations;++i) {
    distanceTable_[i]=new DoubleVector(nOfObservations,-1);
  }
  clusterInformation=vector<int>(nOfObservations,UNCLASSIFIED); // all observations are unclassified
  uint tenpercent=nOfObservations/10;
  uint percent=0;
  BLINK(25) << "done" << endl;
  
  uint clusterId=0;
  for(uint i=0;i<nOfObservations;++i) {
    if(i%tenpercent==0) {DBG(10) << percent << "% done" << endl; percent+=10;}
    if(clusterInformation[i]==UNCLASSIFIED) {
      if(expandClusters(inputdata,clusterInformation,i,clusterId)) {
        ++clusterId;
        DBG(10) << "ClusterId=" << clusterId << endl;
      }
    }
  }
}