/************************************************************************ Função de impressão do heap *************************************************************************/ void print (MyHeap* heap) { int i; printf("\nO conjunto possui %d elementos\n",heap->numberOfElements); printf ("\nElementos:"); for (i=0; i<heap->numberOfElements; i++) printElement (heap->S[i]); }
//should traverse through the entire symbol table and print it // must use the printElement function given above void printSymbolTable(int flag){ ElementPtr tmp_element=NULL; SymbolTableStackEntryPtr current_scope=NULL; int tmp_scopeDepth=scopeDepth; for(current_scope=symbolStackTop;tmp_scopeDepth >= 0 && current_scope != NULL; tmp_scopeDepth--,current_scope=current_scope->prevScope){ for(tmp_element = current_scope->symbolTablePtr->queue; tmp_element!=NULL; tmp_element=tmp_element->queue_next){ printElement(tmp_element); } } return; }
void printStack(Stack* S) { unsigned n = computeNrDashes(S); printDashes(n); printf("\n|"); for (unsigned i = 0; i < S->stackPointer; ++i) { printElement(S->array[i]); } printf("\n"); printDashes(n); printf("\n"); }
//=================================================================================================== void printList(BaseDescriptor base){ // If the list is empty if(listIsEmpty(base)) /** Error **/ else{ BaseDescriptor ptr_p = base; // We are using the pointer to travel few every element of the list until the last one while(ptr_p!=NULL){ printElement(*(ptr_p->element)); ptr_p = ptr_p->next; } } }
void print(const DeviceList* const list) { int i; chprintf((BaseSequentialStream *)&itm_port, "print list->current: %i\n", list->current); for(i = 0; i <= list->current; i++) { chprintf((BaseSequentialStream *)&itm_port, "print list->elements[%d]: %i\n", i, list->elements[i]); Element e = list->elements[i]; chprintf((BaseSequentialStream *)&itm_port, "print e.data: %i\n", e.data); printElement(&e); } chprintf((BaseSequentialStream *)&itm_port, "\n"); }
void printElement(int indent, void* element){ int i; Element* e = (Element*)element; ModelDescription* md; if (!e) return; // print attributes for (i=0; i<indent; i++) fprintf(stderr," "); fprintf(stderr,"%s", elmNames[e->type]); for (i=0; i<e->n; i+=2) fprintf(stderr," %s=%s", e->attributes[i], e->attributes[i+1]); fprintf(stderr,"\n"); // print child nodes indent += 2; switch (getAstNodeType(e->type)) { case astListElement: printList(indent, (void **)((ListElement*)e)->list); break; case astScalarVariable: printElement(indent, ((Type*)e)->typeSpec); printList(indent, (void **)((ScalarVariable*)e)->directDependencies); break; case astType: printElement(indent, ((Type*)e)->typeSpec); break; case astModelDescription: md = (ModelDescription*)e; printList(indent, (void **)md->unitDefinitions); printList(indent, (void **)md->typeDefinitions); printElement(indent, md->defaultExperiment); printList(indent, (void **)md->vendorAnnotations); printList(indent, (void **)md->modelVariables); break; case astElement: break; default: fprintf(stderr, "Ignoring unexpected AstNodeType %d\n", getAstNodeType(e->type)); } }
void printObj(Tny *tny, int level) { char spaces[level + 1]; TnyType type = TNY_NULL; int count = 0; if (level > 0) { for (int i = 0; i < level; i++) { spaces[i] = '\t'; } spaces[level + 1] = '\0'; } else { spaces[0] = '\0'; } for (Tny *next = tny->root; next != NULL; next = next->next) { if (next == tny->root) { type = next->type; continue; } if (type == TNY_ARRAY) { printf("%s[%d]: ", spaces, count); if (printElement(next, level)) { printf("\nCorrupted Tny-Object!\n"); return; } count++; } else if (type == TNY_DICT) { printf("%s%s: ", spaces, next->key); if (printElement(next, level)) { printf("\nCorrupted Tny-Object!\n"); return; } } } }
//! Print Atom solver summary table header. inline std::string printAtomSolverStateTableHeader( ) { std::ostringstream headerBuffer; headerBuffer << printElement( "#", 3, ' ' ) << printElement( "v1_x", 15, ' ' ) << printElement( "v1_y", 15, ' ' ) << printElement( "v1_z", 15, ' ' ) << printElement( "f1", 15, ' ' ) << printElement( "f2", 15, ' ' ) << printElement( "f3", 15, ' ' ) << std::endl; return headerBuffer.str( ); }
void listRelevant() { /* Lists every element of the matrix that isn't a zero. */ int i; if (matrix.length == 0) { printf("empty matrix\n"); return; } for (i = 0; i < matrix.length; i++) { printElement(mElements[i]); } }
//Prints the entire register void printRegister(struct Vehicle* vehicleRegister) { int i; for(i = 0; i < REGISTER_LENGTH; i++) { if(vehicleRegister[i].initilized == 1) { printElement(vehicleRegister, i); printf("----------------\n\n"); } else { i = REGISTER_LENGTH; } } }
//! Print summary of current state of non-linear solver for Atom solver. inline std::string printAtomSolverState( const int iteration, gsl_multiroot_fsolver* solver ) { std::ostringstream buffer; buffer << printElement( iteration, 3, ' ' ) << printElement( gsl_vector_get( solver->x, 0 ), 15, ' ' ) << printElement( gsl_vector_get( solver->x, 1 ), 15, ' ' ) << printElement( gsl_vector_get( solver->x, 2 ), 15, ' ' ) << printElement( gsl_vector_get( solver->f, 0 ), 15, ' ' ) << printElement( gsl_vector_get( solver->f, 1 ), 15, ' ' ) << printElement( gsl_vector_get( solver->f, 2 ), 15, ' ' ) << std::endl; return buffer.str( ); }
void prettyPrint(nodet *root,int recLevel) { if(root==NULL) { recLevel--; return; } recLevel++; prettyPrint(root->right,recLevel); int j=0; for(j=0; j<recLevel-1; j++) { printf(" "); } printElement(root); printf("\n"); prettyPrint(root->left,recLevel); }
//should traverse through the entire symbol table and print it // must use the printElement function given above void printSymbolTable() { int i; SymbolTableStackEntryPtr SymbolStackEntry = symbolStackTop; while(SymbolStackEntry) { for(i=0; i<MAXHASHSIZE;i++) { ElementPtr symelement = SymbolStackEntry->symbolTablePtr->hashTable[i]; while(symelement) { printElement(symelement); symelement = symelement->next; } } SymbolStackEntry = SymbolStackEntry->prevScope; } }
void dump_real(symbolTable *st, int depth){ // Visit all slots and traverse all buckets in the chain, and print all data contained. int i; char padding[256]; bucket *cur; for(i = 0; i<depth; i++) padding[i] = '\t'; padding[i] = '\0'; for(i = 0; i< TABLE_SIZE ; i++){ cur = st->table[i].link; while(cur != NULL){ fprintf(stdout, "%s", padding, i); printElement(cur->inner); if(cur->inner.subRegion != NULL) dump_real(cur->inner.subRegion, depth+1); cur = cur->link; } } }
void prettyPrint(t_btree *root,int recLevel) //! root, index, length, reccurence level { if(root==NULL) { recLevel--; //! reached leaf, must decrement recurence level return; } recLevel++; //! otherwise increment it prettyPrint(root->right,recLevel); //! keep going right in the tree int j=0; //! print spaces for the appropriate recurence level for(j=0; j<recLevel-1; j++) { fprintf(g, " "); } //! then print value printElement(root); //! print a new line fprintf(g, "\n"); prettyPrint(root->left,recLevel); //! keep going left in the tree }
void printElement(Element *elm){ if(elm == NULL){ printf("( NULL )\n"); }else if(elm->type == ET_INTEGER){ printf("%ld \n", elm->ival); }else if(elm->type == ET_DECIMAL){ printf("%f \n", elm->dval); }else if(elm->type == ET_STRING){ printf("'%s' \n", (char*)elm->data); }else if(elm->type == ET_VECTOR){ Vector *v = (Vector*)elm->data; printf("< \n"); for(int i=0; i<v->len; ++i){ printf(" "); printElement(v->data[i]); } printf(">\n"); }else{ printf(" [ ??? ] \n"); } }
/* * Print the vertex and the edges in a binary tree */ void printTreeEdges(binTreeNode_t *pTree) { linkedList_t * pList = NULL; llNode_t * printNode = NULL; if (pTree != NULL) { pList = (linkedList_t *) pTree->value;; if(pList != NULL) { if((printNode = (llNode_t *) pList->pHead) != NULL) { while(printNode != NULL) { printf("%d ", pTree->key); printNode = printElement(printNode); printf("\n"); } } } printTreeEdges(pTree->left); printTreeEdges(pTree->right); } }
void printElement(int *array, int length, int *printArray) { if(length == 0) { int num; for(num = 0; num < NARABI_LENGTH; num++) { printf("%d", printArray[num]); } printf("\n"); return; } int i; for (i = 0; i < length; i++) { printArray[NARABI_LENGTH - length] = array[i]; int array2[length-1]; int count=0; int j; for(j = 0; count < length-1;j++) { if(j != i) { array2[count]=array[j]; count++; } } printElement(array2, length - 1, printArray); } }
void ToolsSplashParallel::printFields(std::vector<ExDataContainer> fileData) { if (fileData.size() > 0) { if (m_options.verbose) errorStream << "container = " << fileData.size() << std::endl; Dimensions domain_size = fileData[0].container->getSize(); size_t size1, size2; if (m_options.fieldDims[0]) { size1 = domain_size[0]; if (m_options.fieldDims[1]) size2 = domain_size[1]; else size2 = domain_size[2]; } else { size1 = domain_size[1]; size2 = domain_size[2]; } if (m_options.isReverseSlice) { size_t tmpSize = size1; size1 = size2; size2 = tmpSize; } for (size_t j = 0; j < size2; ++j) { size_t index = 0; for (size_t i = 0; i < size1; ++i) { if (!m_options.isReverseSlice) index = j * size1 + i; else index = i * size2 + j; for (std::vector<ExDataContainer>::iterator iter = fileData.begin(); iter != fileData.end(); ++iter) { DCDataType data_type = iter->container->getIndex(0)->getDataType(); void* element = iter->container->getElement(index); assert(element != NULL); printElement(data_type, element, iter->unit, m_options.delimiter); } } m_outStream << std::endl; if (m_options.verbose && index % 100000 == 0) errorStream << "." << std::flush; } if (m_options.verbose) errorStream << std::endl; } }
void ToolsSplashParallel::printParticles(std::vector<ExDataContainer> fileData) { if (fileData.size() > 0) { size_t num_elements = fileData[0].container->getNumElements(); if (m_options.verbose) { errorStream << "num_elements = " << num_elements << std::endl; errorStream << "container = " << fileData.size() << std::endl; } std::map<DataContainer*, DomainData*> subdomain; std::map<DataContainer*, size_t> subdomainIndex; std::map<DataContainer*, size_t> numElementsProcessed; for (size_t i = 0; i < num_elements; ++i) { for (std::vector<ExDataContainer>::iterator iter = fileData.begin(); iter != fileData.end(); ++iter) { DataContainer *container = iter->container; DCDataType data_type = container->getIndex(0)->getDataType(); if (i == 0) { if (m_options.verbose) errorStream << "container " << container << " has " << container->getNumSubdomains() << " subdomains" << std::endl; subdomainIndex[container] = 0; subdomain[container] = container->getIndex(subdomainIndex[container]); numElementsProcessed[container] = 0; if (m_options.verbose) errorStream << "Loading domaindata 0 for container " << container << " (element = " << i << ")" << std::endl; dc.readDomainLazy(subdomain[container]); } else { if (numElementsProcessed[container] == subdomain[container]->getElements().getScalarSize()) { subdomain[container]->freeData(); subdomainIndex[container]++; numElementsProcessed[container] = 0; subdomain[container] = container->getIndex(subdomainIndex[container]); if (m_options.verbose) errorStream << std::endl << "Loading domaindata " << subdomainIndex[container] << " for container " << container << " (element = " << i << ")" << std::endl; dc.readDomainLazy(subdomain[container]); } } void* element = container->getElement(i); assert(element != NULL); printElement(data_type, element, iter->unit, m_options.delimiter); numElementsProcessed[container]++; } m_outStream << std::endl; if (m_options.verbose && i % 100000 == 0) errorStream << "." << std::flush; } if (m_options.verbose) errorStream << std::endl; } }
static void printList(int indent, void** list){ int i; if (list) for (i=0; list[i]; i++) printElement(indent, list[i]); }
int selects( const XmElem *top, const enum SELECTOR sel, const char *pattern, FILE *outfile ){ //check for valid input pattern if ( (pattern[0] != 'a' && pattern[0] != 't' && pattern[0] != 'p') || pattern[1] != '='){ fprintf (stderr, "\nIncorrect string match pattern. Should be: <field>=<regex>\n"); return EXIT_FAILURE; } if ( printCollectionHeader(top, outfile) == 0 ){ return EXIT_FAILURE; } char const *reggie = &pattern[2]; //search each child for string reggie it it's specified tag BibData bibinfo; if (sel==KEEP){ for (int i = 0; i < top->nsubs; i++){ if ( (*top->subelem)[i] != NULL ){ marc2bib( (*top->subelem)[i], bibinfo ); } switch (pattern[0]){ case 'a':{ if ( match(bibinfo[AUTHOR], reggie) ){ if ( printElement( (*top->subelem)[i] , outfile, 1) == -1 ){ return EXIT_FAILURE; } } break; } case 't':{ if ( match(bibinfo[TITLE], reggie) ){ if ( printElement( (*top->subelem)[i] , outfile, 1) == -1 ){ return EXIT_FAILURE; } } break; } case 'p':{ if ( match(bibinfo[PUBINFO], reggie) ){ if ( printElement( (*top->subelem)[i] , outfile, 1) == -1 ){ return EXIT_FAILURE; } } break; } default:; } free(bibinfo[AUTHOR]); free(bibinfo[TITLE]); free(bibinfo[PUBINFO]); free(bibinfo[CALLNUM]); } }else if (sel == DISCARD){ for (int i = 0; i < top->nsubs; i++){ if ( (*top->subelem)[i] != NULL ){ marc2bib( (*top->subelem)[i], bibinfo ); } switch (pattern[0]){ case 'a':{ if ( match(bibinfo[AUTHOR], reggie) == 0 ){ if ( printElement( (*top->subelem)[i] , outfile, 1) == -1 ){ return EXIT_FAILURE; } } break; } case 't':{ if ( match(bibinfo[TITLE], reggie) == 0 ){ if ( printElement( (*top->subelem)[i] , outfile, 1) == -1 ){ return EXIT_FAILURE; } } break; } case 'p':{ if ( match(bibinfo[PUBINFO], reggie) ==0 ){ if ( printElement( (*top->subelem)[i] , outfile, 1) == -1 ){ return EXIT_FAILURE; } } break; } default:; } free(bibinfo[AUTHOR]); free(bibinfo[TITLE]); free(bibinfo[PUBINFO]); free(bibinfo[CALLNUM]); } } fprintf (outfile, "</marc:collection>\n"); return EXIT_SUCCESS; }
int review( const XmElem *top, FILE *outfile ){ if ( printCollectionHeader(top, outfile) == 0 ){ return EXIT_FAILURE; } FILE *input = fopen("/dev/tty", "r"); FILE *output = fopen("/dev/tty", "w"); if (input==NULL || output==NULL){ fprintf (stderr, "\nError, could not open /dev/tty\n"); return EXIT_FAILURE; } //Page 195, Begining Linux Programming 4th Ed. struct termios initial_settings, new_settings; tcgetattr(fileno(input) ,&initial_settings); new_settings = initial_settings; new_settings.c_lflag &= ~ICANON; new_settings.c_lflag &= ~ECHO; new_settings.c_cc[VMIN] = 1; new_settings.c_cc[VTIME] = 0; new_settings.c_lflag &= ~ISIG; if(tcsetattr(fileno(input), TCSANOW, &new_settings) != 0){ fprintf(stderr,"could not set attributes\n"); return EXIT_FAILURE; } BibData bibinfo; for (int i = 0; i < top->nsubs; i++){ if ( (*top->subelem)[i] != NULL && strcmp( (*top->subelem)[i]->tag, "record") == 0 ){ marc2bib( (*top->subelem)[i], bibinfo ); fprintf (output, "%d. %s %s %s %s", i+1, bibinfo[AUTHOR], bibinfo[TITLE], bibinfo[PUBINFO], bibinfo[CALLNUM]); if ( bibinfo[CALLNUM][ strlen( bibinfo[CALLNUM])-1 ] != '.'){ fprintf(output, "%c\n", '.'); }else{ fprintf(output, "\n"); } //get input and act on it char c = fgetc( input ); if ( c != ' ' && c != '\n' && c != 'd' && c != 'k' ){ fprintf (output, "\nInvalid input:"); fprintf (output, "\n< enter > : keep record"); fprintf (output, "\n< space > : skip record"); fprintf (output, "\n< k > : keep remaining records"); fprintf (output, "\n< d > : discard remaining records\n"); i --; //this will cause the last record to be displayed again }else if (c == ' '){ //skip record, therefor do nothing }else if (c == '\n'){ if ( printElement( (*top->subelem)[i] , outfile, 1) == -1 ){ return EXIT_FAILURE; } }else if (c == 'd'){ i = top->nsubs; //this will break the loop and 'discard' the rest of the records }else if (c == 'k'){ for (int g = i; g < top->nsubs; g++){ if ( printElement( (*top->subelem)[g] , outfile, 1) == -1 ){ return EXIT_FAILURE; } } i = top->nsubs; //break i forloop } free(bibinfo[AUTHOR]); free(bibinfo[TITLE]); free(bibinfo[PUBINFO]); free(bibinfo[CALLNUM]); } } tcsetattr(fileno(input), TCSANOW, &initial_settings); //Page 195, Begining Linux Programming 4th ed fclose (input); fclose (output); fprintf (outfile, "</marc:collection>\n"); return 0; }
Token* opPrint(State* s, Token* tk){ Element *top = stackPoll(s->stack); printElement(top); return tk; }
//Vypis celkovej statistiky void Model::VypisStatistiky(double cas) { const int nameWidth = 12; const int numWidth = 8; double priemernaDoba; std::cout << "\n\n************* Celkove statistiky *************\n"; std::cout << std::setw(32) << std::setfill('_') << "_" << std::endl << "| "; printElement("model: ", 7); printElement(nazov.c_str(), 22); std::cout << std::left << "|" << std::endl << std::left << std::setw(30) << std::setfill('-') << "|-" << std::left << "-|"; std::cout << std::endl << "| "; printElement("casovy interval: 0 - ", 21); printElement(cas, 7); std::cout << " |" << std::endl; std::cout << std::left << std::setw(30) << std::setfill('_') << "|_" << std::left << "_|\n"; std::cout << std::endl; std::cout << "\n------> MIESTA (pocet znaciek)\n"; std::cout << std::setw((3+nameWidth+numWidth*4)) << std::setfill('_') << "_" << std::endl << "| "; printElement("nazov ", nameWidth); printElement("max ", numWidth); printElement("min ", numWidth); printElement("act ", numWidth); printElement("avg ", numWidth); std::cout << std::left << "|" << std::endl << std::left << std::setw((1+nameWidth+numWidth*4)) << std::setfill('-') << "|-" << std::left << "-|"; std::cout << std::endl; for (unsigned int i = 0; i < miesta.size(); i++) { if(miesta[i]->aktualizovane != 0) priemernaDoba = (double)miesta[i]->sum / miesta[i]->aktualizovane; else priemernaDoba = 0; std::cout << "| "; printElement(miesta[i]->GetId().c_str(), nameWidth); printElement(miesta[i]->max, numWidth); printElement(miesta[i]->min, numWidth); printElement(miesta[i]->GetPocetZnaciek(), numWidth); printDElement(priemernaDoba, numWidth-1); std::cout << " |" << std::endl; } std::cout << std::left << std::setw((1+nameWidth+numWidth*4)) << std::setfill('_') << "|_" << std::left << "_|"; std::cout << std::endl; std::cout << std::endl << "\n------> PRECHODY - S GENEROVANYM CASOM\n"; std::cout << std::setw((3+nameWidth+numWidth*4)) << std::setfill('_') << "_" << std::endl << "| "; printElement("nazov ", nameWidth); printElement("count ", numWidth); printElement("max ", numWidth); printElement("min ", numWidth); printElement("avg ", numWidth); std::cout << std::left << "|" << std::endl << std::left << std::setw((1+nameWidth+numWidth*4)) << std::setfill('-') << "|-" << std::left << "-|"; std::cout << std::endl; for (unsigned int i = 0; i < prechody.size(); i++) { if (prechody[i]->GetTyp() == CAS_GENE) { if(prechody[i]->pocitadloVykonani != 0) priemernaDoba = prechody[i]->casSum / prechody[i]->pocitadloVykonani; else priemernaDoba = 0; std::cout << "| "; printElement(prechody[i]->GetId().c_str(), nameWidth); printElement(prechody[i]->pocitadloVykonani, numWidth); printElement(prechody[i]->casMax, numWidth); printElement(prechody[i]->casMin, numWidth); printDElement(priemernaDoba, numWidth-1); std::cout << " |"<< std::endl; } } std::cout << std::left << std::setw(1+nameWidth+numWidth*4) << std::setfill('_') << "|_" << std::left << "_|"; std::cout << std::endl; std::cout << std::endl << "\n------> PRECHODY - OSTATNE\n"; std::cout << std::setw((3+nameWidth+numWidth)) << std::setfill('_') << "_" << std::endl << "| "; printElement("nazov ", nameWidth); printElement("count ", numWidth); std::cout << std::left << "|" << std::endl << std::left << std::setw((1+nameWidth+numWidth)) << std::setfill('-') << "|-" << std::left << "-|"; std::cout << std::endl; for (unsigned int i = 0; i < prechody.size(); i++) { if (prechody[i]->GetTyp() != CAS_GENE) { std::cout << "| "; printElement(prechody[i]->GetId().c_str(), nameWidth); printElement(prechody[i]->pocitadloVykonani, numWidth-1); std::cout << " |"<< std::endl; } } std::cout << std::left << std::setw(1+nameWidth+numWidth) << std::setfill('_') << "|_" << std::left << "_|"; std::cout << std::endl; }
//funkcia pre vypis priebeznych statistyk => pocet znaciek v miestach // => pocet vykonani prechodov void Model::VypisStav(double simTime) { const int nameWidth = 12; const int numWidth = 7; double avg; char c = '-'; std::cout << std::endl; //std::cout << ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n"; std::cout << "Priebezna statistika v case: " << simTime << std::endl; std::cout << std::endl << "---> MIESTA (pocet znaciek)\n"; std::cout << std::setw((3+nameWidth+numWidth*2)) << std::setfill('_') << "_" << std::endl << "| "; printElement("nazov ", nameWidth); printElement("act ", numWidth); printElement("avg ", numWidth); std::cout << std::left << "|" << std::endl << std::left << std::setw((1+nameWidth+numWidth*2)) << std::setfill('-') << "|-" << std::left << "-|"; std::cout << std::endl; for (unsigned int i = 0; i < miesta.size(); i++) { if(miesta[i]->aktualizovane != 0) avg = (double)miesta[i]->sum / miesta[i]->aktualizovane; else avg = 0; if(miesta[i]->GetPocetZnaciek() > 0 || avg > 0) { std::cout << "| "; printElement(miesta[i]->GetId().c_str(), nameWidth); printElement(miesta[i]->GetPocetZnaciek(), numWidth); if (avg != 0) printDElement(avg, numWidth-1); else printElement(c, numWidth-1); std::cout << " |" << std::endl; } } std::cout << std::left << std::setw((1+nameWidth+numWidth*2)) << std::setfill('_') << "|_" << std::left << "_|"; std::cout << std::endl; std::cout << std::endl << "---> PRECHODY\n"; std::cout << std::setw((3+nameWidth+numWidth*2)) << std::setfill('_') << "_" << std::endl << "| "; printElement("nazov ", nameWidth); printElement("count ", numWidth); printElement("avg ", numWidth); std::cout << std::left << "|" << std::endl << std::left << std::setw((1+nameWidth+numWidth*2)) << std::setfill('-') << "|-" << std::left << "-|"; std::cout << std::endl; for (unsigned int i = 0; i < prechody.size(); i++) { if(prechody[i]->pocitadloVykonani != 0) { avg = prechody[i]->casSum / prechody[i]->pocitadloVykonani; std::cout << "| "; printElement(prechody[i]->GetId().c_str(), nameWidth); printElement(prechody[i]->pocitadloVykonani, numWidth); if (avg > 0.001) printDElement(avg, numWidth-1); else printElement(c, numWidth-1); std::cout << " |"<< std::endl; } } std::cout << std::left << std::setw(1+nameWidth+numWidth*2) << std::setfill('_') << "|_" << std::left << "_|"; std::cout << std::endl; std::cout << "--------------------------------------------------------------\n"; }
//! Print Cartesian-state-to-TLE converter solver summary table header. inline std::string printCartesianToTleSolverStateTableHeader( ) { std::ostringstream headerBuffer; headerBuffer << printElement( "#", 3, ' ' ) << printElement( "a", 15, ' ' ) << printElement( "e", 15, ' ' ) << printElement( "i", 15, ' ' ) << printElement( "AoP", 15, ' ' ) << printElement( "RAAN", 15, ' ' ) << printElement( "TA", 15, ' ' ) << printElement( "f1", 15, ' ' ) << printElement( "f2", 15, ' ' ) << printElement( "f3", 15, ' ' ) << printElement( "f4", 15, ' ' ) << printElement( "f5", 15, ' ' ) << printElement( "f6", 15, ' ' ) << std::endl; return headerBuffer.str( ); }