void RepeatOverviewDisplay::calculateOutputPixels() { /**/ qDebug() << "RepeatOverviewDisplay::load: " << ++frameCount; qDebug() << "Width: " << ui->getWidth() << "\nScale: " << ui->getScale() << "\nStart: " << ui->getStart(glWidget); vector<color> alignment_colors; int end = max(1, (ui->getStart(glWidget) + current_display_size()) - 251); for(int i = ui->getStart(glWidget); i < end; i += internalScale) alignment_colors.push_back( simpleAlignment(i) ); storeDisplay( alignment_colors, width()); upToDate = true; }
void AlignmentDisplay::VLRcheck(vector<point> matches)//alternative to loadTexture { /*int s = ui->scaleDial->value(); s = max(4, (s / 4) * 4);//enforces scale is a multiple of 4 ui->scaleDial->setValue(s); checkVariables();*/ //return if changed? vector<color> alignment_colors; int end = max(1, (nucleotide_start + display_size) - 251); for(int i = nucleotide_start; i < end; i+=scale) alignment_colors.push_back( simpleAlignment(i) ); mergeMatches( alignment_colors, matches ); if(textureBuffer) delete textureBuffer; textureBuffer = new TextureCanvas( alignment_colors, width()); upToDate = true; }
double RMSD::calculate(const std::vector<Vector> & positions,std::vector<Vector> &derivatives, bool squared){ double ret=0.; switch(alignmentMethod){ case SIMPLE: // do a simple alignment without rotation ret=simpleAlignment(align,displace,positions,reference,log,derivatives,squared); break; case OPTIMAL_FAST: // this is calling the fastest option: ret=optimalAlignment<false>(align,displace,positions,reference,derivatives,squared); break; case OPTIMAL: bool fastversion=true; // this is because fast version only works with align==displace if (align!=displace) fastversion=false; if (fastversion){ // this is the fast routine but in the "safe" mode, which gives less numerical error: ret=optimalAlignment<true>(align,displace,positions,reference,derivatives,squared); } else { if (myoptimalalignment==NULL){ // do full initialization // // I create the object only here // since the alignment object require to know both position and reference // and it is possible only at calculate time // myoptimalalignment=new OptimalAlignment(align,displace,positions,reference,log); } // this changes the P0 according the running frame (*myoptimalalignment).assignP0(positions); ret=(*myoptimalalignment).calculate(squared, derivatives); //(*myoptimalalignment).weightedFindiffTest(false); } break; } return ret; }
void AlignmentDisplay::loadTexture() { /**/ int s = ui->scaleDial->value(); if(s % 4 != 0) { ui->print("Warning: The SCALE on Repeat Overview should be set to a multiple of 4."); } //s = max(4, (s / 4) * 4);//enforces scale is a multiple of 4 //ui->scaleDial->setValue(s); checkVariables();/**/ //return if changed? vector<color> alignment_colors; int end = max(1, (nucleotide_start + display_size) - 251); for(int i = nucleotide_start; i < end; i+=scale) alignment_colors.push_back( simpleAlignment(i) ); if(textureBuffer) delete textureBuffer; textureBuffer = new TextureCanvas( alignment_colors, width()); upToDate = true; }