Main Page | Namespace List | Class Hierarchy | Compound List | File List | Namespace Members | Compound Members | File Members

SeqPair.h

Go to the documentation of this file.
00001 /**************************************************************************
00002 ***    
00003 *** Copyright (c) 1995-2000 Regents of the University of California,
00004 ***               Andrew E. Caldwell, Andrew B. Kahng and Igor L. Markov
00005 *** Copyright (c) 2000-2004 Regents of the University of Michigan,
00006 ***               Saurabh N. Adya, Jarrod A. Roy and Igor L. Markov
00007 ***
00008 ***  Contact author(s): abk@cs.ucsd.edu, imarkov@umich.edu
00009 ***  Original Affiliation:   UCLA, Computer Science Department,
00010 ***                          Los Angeles, CA 90095-1596 USA
00011 ***
00012 ***  Permission is hereby granted, free of charge, to any person obtaining 
00013 ***  a copy of this software and associated documentation files (the
00014 ***  "Software"), to deal in the Software without restriction, including
00015 ***  without limitation 
00016 ***  the rights to use, copy, modify, merge, publish, distribute, sublicense, 
00017 ***  and/or sell copies of the Software, and to permit persons to whom the 
00018 ***  Software is furnished to do so, subject to the following conditions:
00019 ***
00020 ***  The above copyright notice and this permission notice shall be included
00021 ***  in all copies or substantial portions of the Software.
00022 ***
00023 *** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 
00024 *** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
00025 *** OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
00026 *** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
00027 *** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
00028 *** OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
00029 *** THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00030 ***
00031 ***
00032 ***************************************************************************/
00033 
00034 
00035 
00036 
00037 #ifndef SEQPAIR_H
00038 #define SEQPAIR_H
00039 
00040 #include <fstream>
00041 #include <vector>
00042 #include <algorithm>
00043 #include <math.h>
00044 #include <stdlib.h>
00045 
00046 namespace parquetfp
00047 {
00048    class SeqPair
00049    {
00050    private:
00051       vector<unsigned> _XX;         //seqPair in the X direction
00052       vector<unsigned> _YY;         //seqPair in the Y direction
00053 
00054    public:
00055       // empty sequence-pair
00056       SeqPair(){}
00057 
00058       // random sequence-pair of length "size"
00059       SeqPair(unsigned size);
00060 
00061       // sequence-pair (X, Y)
00062       SeqPair(const vector<unsigned>& X, const vector<unsigned>& Y);
00063 
00064       inline const vector<unsigned>& getX() const;
00065       inline const vector<unsigned>& getY() const;
00066   
00067       inline void putX(const vector<unsigned>& X);
00068       inline void putY(const vector<unsigned>& Y);
00069 
00070       inline void printX(void) const;
00071       inline void printY(void) const;
00072 
00073       inline unsigned getSize(void) const;
00074    };
00075 
00076    // -----IMPLEMENTATIONS-----
00077    const vector<unsigned>& SeqPair::getX(void) const
00078    {   return _XX; }
00079 
00080    const vector<unsigned>& SeqPair::getY(void) const
00081    {   return _YY; }
00082 
00083    void SeqPair::putX(const vector<unsigned>& X)
00084    { _XX = X; }
00085 
00086    void SeqPair::putY(const vector<unsigned>& Y)
00087    { _YY = Y; }
00088 
00089    unsigned SeqPair::getSize(void) const
00090    {  return _XX.size(); }
00091 
00092    void SeqPair::printX(void) const
00093    {
00094       cout<<"X Seq Pair"<<endl;
00095       for(unsigned i=0; i<_XX.size(); ++i)
00096       {
00097          cout<<_XX[i]<<" ";
00098       }
00099       cout<<endl;
00100    }
00101 
00102    void SeqPair::printY(void) const
00103    {
00104       cout<<"Y Seq Pair"<<endl;
00105       for(unsigned i=0; i<_XX.size(); ++i)
00106       {
00107          cout<<_YY[i]<<" ";
00108       }
00109       cout<<endl;
00110    }
00111 }
00112 //using namespace parquetfp;
00113 
00114 #endif

Generated on Mon Apr 25 01:09:25 2005 for Parquete by doxygen 1.3.2