1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | cfMesh: A library for mesh generation
5 \\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
6 \\/ M anipulation | Copyright (C) Creative Fields, Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of cfMesh.
11 cfMesh is free software; you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation; either version 3 of the License, or (at your
14 option) any later version.
16 cfMesh is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with cfMesh. If not, see <http://www.gnu.org/licenses/>.
28 This class is an implementation of a list of graphs
29 with variable column width. The implementation is memory efficient.
35 \*---------------------------------------------------------------------------*/
37 #ifndef VRWGraphList_H
38 #define VRWGraphList_H
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 /*---------------------------------------------------------------------------*\
49 Class VRWGraphList Declaration
50 \*---------------------------------------------------------------------------*/
56 //- graph containing the data
60 LongList<rowElement> rows_;
62 // Private member functions
64 inline void checkIndex
76 inline VRWGraphList();
79 inline VRWGraphList(const VRWGraphList&);
83 inline ~VRWGraphList();
89 //- Returns the number of graphs
90 inline label size() const;
92 //- Returns the number of rows in the graph at that position
93 inline label sizeOfGraph(const label posI) const;
95 //- Return the number of element in the row at the given position
96 inline label sizeOfRow(const label posI, const label rowI) const;
103 //- Append a graph at the end of the graphList
104 template<class GraphType>
105 inline void appendGraph(const GraphType& l);
107 //- get and set operators
108 inline label operator()
115 inline label& operator()(const label i, const label j, const label k);
117 inline const subGraph<const VRWGraph> operator[](const label i) const;
119 //- Assignment operator
120 inline void operator=(const VRWGraphList&);
123 // IOstream operators
125 // Write VRWGraphList to Ostream.
126 friend Ostream& operator<<(Ostream&, const VRWGraphList&);
128 //- Read from Istream, discarding contents of existing VRWGraphList.
129 /* friend Istream& operator>> <T, width>
132 VRWGraphList<T, width>&
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140 } // End namespace Foam
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 #include "VRWGraphListI.H"
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
150 // ************************************************************************* //