/* $Id: showutil.cc 5149 2010-03-24 23:37:18Z abehm $ Copyright (C) 2010 by The Regents of the University of California Redistribution of this file is permitted under the terms of the BSD license. Author: Jiaheng Lu Date: 05/14/2007 */ #include "showutil.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include "heap.h" using namespace std; template void printArray (const T *array, unsigned count){ for(unsigned i=0; i void printVector (const S *v, unsigned count) { for(unsigned i=0; iat(i) << " "; cout << endl; }//end printVector void printVectorUnsigned(const vector *v, unsigned count) { for(unsigned i=0; iat(i) << " "; cout << endl; }//end printVectorUnsigned void printArrayUnsigned(const unsigned *array, unsigned count) { for(unsigned i=0; i *v){ for(unsigned i =0 ;i<(*v).size();i++) cout << (*v)[i] << " " ; cout << endl; }//end showVectorInt void showStringVector(const vector &v){ for(unsigned i =0 ;i *v){ for(unsigned i =0 ;i<(*v).size();i++) cout << v->at(i) << " " ; cout << endl; }//end showArrayUnsigned void showVectorUnsigned(vector *v){ for(unsigned i =0 ;i<(*v).size();i++) cout << v->at(i) << " " ; cout << endl; }//end showVectorUnsigned void showArrayUnsignedLists(const vector*> &lists) { cout << "Now begin show all lists (size is "<< lists.size()<< "): " << endl; for(unsigned k=0;(unsigned)k *onelist = lists.at(k); cout << "List "<< k << " is: " << endl; showArrayUnsigned(onelist); }//end for }//end showVectorUnsignedList void showUnsignedSet( set > *s) { cout << "The size of set is " << s->size()<< endl; set >::iterator ite = s->begin(); while ( ite != s->end()) { cout << *ite << " " ; ite++; }//end while cout << endl; }//end showUnsignedSet