Class to create, store and output qgraph files. More...
#include <OpenFOAM/graph.H>
Class to create, store and output qgraph files.
Classes | |
class | writer |
Abstract base class for a graph writer. More... | |
struct | xy |
Public Member Functions | |
graph (const string &title, const string &xName, const string &yName, const scalarField &x) | |
Construct from title and labels (no curves) | |
graph (const string &title, const string &xName, const string &yName, const scalarField &x, const scalarField &y) | |
Construct from title, labels and y data for 1 curve. | |
graph (const string &title, const string &xName, const string &yName, Istream &is) | |
Construct from Istream given title and labels. | |
graph (Istream &is) | |
Construct from Istream. | |
const string & | title () const |
const string & | xName () const |
const string & | yName () const |
const scalarField & | x () const |
scalarField & | x () |
const scalarField & | y () const |
scalarField & | y () |
void | writeTable (Ostream &) const |
Write out graph data as a simple table. | |
void | write (Ostream &, const word &format) const |
Write graph to stream in given format. | |
void | write (const fileName &fName, const word &format) const |
Write graph to file in given format. | |
![]() | |
HashPtrTable (const label size=128) | |
Construct given initial table size. | |
HashPtrTable (Istream &, const INew &) | |
Construct from Istream using given Istream constructor class. | |
HashPtrTable (Istream &) | |
Construct from Istream using default Istream constructor class. | |
HashPtrTable (const HashPtrTable< curve, word, string::hash > &) | |
Construct as copy. | |
~HashPtrTable () | |
curve * | remove (iterator &) |
Remove and return the pointer specified by given iterator. | |
bool | erase (iterator &) |
Erase an hashedEntry specified by given iterator. | |
void | clear () |
Clear all entries from table. | |
void | operator= (const HashPtrTable< curve, word, string::hash > &) |
![]() | |
bool | set (const word &, const curve *&newElmt) |
Assign a new hashedEntry, overwriting existing entries. | |
HashTable (const label size=128) | |
Construct given initial table size. | |
HashTable (Istream &, const label size=128) | |
Construct from Istream. | |
HashTable (const HashTable< curve *, word, string::hash > &) | |
Construct as copy. | |
HashTable (const Xfer< HashTable< curve *, word, string::hash > > &) | |
Construct by transferring the parameter contents. | |
~HashTable () | |
label | size () const |
Return number of elements in table. | |
bool | empty () const |
Return true if the hash table is empty. | |
bool | found (const word &) const |
Return true if hashedEntry is found in table. | |
iterator | find (const word &) |
Find and return an iterator set at the hashedEntry. | |
const_iterator | find (const word &) const |
Find and return an const_iterator set at the hashedEntry. | |
List< word > | toc () const |
Return the table of contents. | |
List< word > | sortedToc () const |
Return the table of contents as a sorted list. | |
Ostream & | printInfo (Ostream &) const |
Print information. | |
bool | insert (const word &, const curve *&newElmt) |
Insert a new hashedEntry. | |
bool | erase (const iterator &) |
Erase an hashedEntry specified by given iterator. | |
bool | erase (const word &) |
Erase an hashedEntry specified by given key if in table. | |
label | erase (const UList< word > &) |
Remove entries given by the listed keys from this HashTable. | |
label | erase (const HashTable< AnyType, word, AnyHash > &) |
Remove entries given by the given keys from this HashTable. | |
void | resize (const label newSize) |
Resize the hash table for efficiency. | |
void | clearStorage () |
Clear the table entries and the table itself. | |
void | transfer (HashTable< curve *, word, string::hash > &) |
Transfer the contents of the argument table into this table. | |
Xfer< HashTable< curve *, word, string::hash > > | xfer () |
Transfer contents to the Xfer container. | |
curve *& | operator[] (const word &) |
Find and return an hashedEntry. | |
const curve *& | operator[] (const word &) const |
Find and return an hashedEntry. | |
curve *& | operator() (const word &) |
Find and return an hashedEntry, create it null if not present. | |
void | operator= (const HashTable< curve *, word, string::hash > &) |
Assignment. | |
bool | operator== (const HashTable< curve *, word, string::hash > &) const |
Equality. Two hash tables are equal if all contents of first are. | |
bool | operator!= (const HashTable< curve *, word, string::hash > &) const |
The opposite of the equality operation. Takes linear time. | |
iterator | begin () |
iterator set to the begining of the HashTable | |
const_iterator | begin () const |
const_iterator set to the beginning of the HashTable | |
const iterator & | end () |
iterator set to beyond the end of the HashTable | |
const const_iterator & | end () const |
const_iterator set to beyond the end of the HashTable | |
const_iterator | cbegin () const |
const_iterator set to the beginning of the HashTable | |
const const_iterator & | cend () const |
const_iterator set to beyond the end of the HashTable |
Friends | |
Ostream & | operator<< (Ostream &, const graph &) |
Ostream Operator. |
Additional Inherited Members | |
![]() | |
typedef HashTable< curve *, word, string::hash > ::iterator | iterator |
typedef HashTable< curve *, word, string::hash > ::const_iterator | const_iterator |
![]() | |
typedef curve * | value_type |
Type of values the HashTable contains. | |
typedef curve *& | reference |
Type that can be used for storing into HashTable::value_type. | |
typedef const curve *& | const_reference |
Type that can be used for storing into constant. | |
typedef label | size_type |
The type that can represent the size of a HashTable. |
graph | ( | const string & | title, |
const string & | xName, | ||
const string & | yName, | ||
const scalarField & | x | ||
) |
graph | ( | const string & | title, |
const string & | xName, | ||
const string & | yName, | ||
const scalarField & | x, | ||
const scalarField & | y | ||
) |
Construct from title, labels and y data for 1 curve.
Definition at line 80 of file graph.C.
References curve::curveStyle::CONTINUOUS, and insert().
|
inline |
Definition at line 150 of file graph.H.
Referenced by gnuplotGraph::write(), and xmgrGraph::write().
|
inline |
Definition at line 155 of file graph.H.
Referenced by gnuplotGraph::write(), jplotGraph::write(), and xmgrGraph::write().
|
inline |
Definition at line 160 of file graph.H.
Referenced by gnuplotGraph::write(), and xmgrGraph::write().
|
inline |
Definition at line 166 of file graph.H.
Referenced by Foam::kShellIntegration(), noiseFFT::Ldelta(), noiseFFT::Lf(), noiseFFT::Pdelta(), gnuplotGraph::write(), and xmgrGraph::write().
|
inline |
const scalarField & y | ( | ) | const |
Definition at line 123 of file graph.C.
References HashTable< curve *, word, string::hash >::begin(), Foam::exit(), Foam::FatalError, FatalErrorIn, and HashTable< curve *, word, string::hash >::size().
Referenced by noiseFFT::Ldelta(), noiseFFT::Lf(), noiseFFT::Lsum(), and noiseFFT::Pdelta().
scalarField & y | ( | ) |
Definition at line 135 of file graph.C.
References HashTable< curve *, word, string::hash >::begin(), Foam::exit(), Foam::FatalError, FatalErrorIn, and HashTable< curve *, word, string::hash >::size().
void writeTable | ( | Ostream & | os | ) | const |
Write out graph data as a simple table.
Definition at line 192 of file graph.C.
References HashTable< curve *, word, string::hash >::begin(), HashTable< curve *, word, string::hash >::end(), Foam::endl(), forAll, Foam::setw(), and token::SPACE.
Referenced by Foam::operator<<(), rawGraph::write(), and jplotGraph::write().
Write graph to stream in given format.
Definition at line 212 of file graph.C.
References graph::writer::New().
Referenced by Foam::makeGraph(), and graph::write().
Write graph to file in given format.
Definition at line 218 of file graph.C.
References Foam::endl(), IOstream::good(), OFstream::name(), graph::writer::New(), WarningIn, and graph::write().