Class to create, store and output qgraph files. More...
Classes | |
class | writer |
Abstract base class for a graph writer. More... | |
Public Member Functions | |
graph (const string &title, const string &xName, const string &yName, const scalarField &x) | |
Construct from title and labels (no curves) More... | |
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. More... | |
graph (const string &title, const string &xName, const string &yName, Istream &is) | |
Construct from Istream given title and labels. More... | |
graph (Istream &is) | |
Construct from Istream. More... | |
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. More... | |
void | write (Ostream &, const word &format) const |
Write graph to stream in given format. More... | |
void | write (const fileName &pName, const word &format) const |
Write graph to file in given path-name and format. More... | |
void | write (const fileName &path, const word &name, const word &format) const |
Write graph to file in given path, name and format. More... | |
Public Member Functions inherited from HashPtrTable< curve > | |
HashPtrTable (const label size=128) | |
Construct given initial table size. More... | |
HashPtrTable (Istream &, const INew &) | |
Construct from Istream using given Istream constructor class. More... | |
HashPtrTable (Istream &) | |
Construct from Istream using default Istream constructor class. More... | |
HashPtrTable (const dictionary &) | |
Construct from dictionary using default dictionary constructor. More... | |
HashPtrTable (const HashPtrTable< curve, word, string::hash > &) | |
Copy constructor. More... | |
HashPtrTable (HashPtrTable< curve, word, string::hash > &&) | |
Move constructor. More... | |
~HashPtrTable () | |
Destructor. More... | |
curve * | remove (iterator &) |
Remove and return the pointer specified by given iterator. More... | |
bool | erase (iterator &) |
Erase an hashedEntry specified by given iterator. More... | |
void | clear () |
Clear all entries from table. More... | |
void | write (Ostream &os) const |
Write. More... | |
void | operator= (const HashPtrTable< curve, word, string::hash > &) |
Assignment operator. More... | |
void | operator= (HashPtrTable< curve, word, string::hash > &&) |
Move assignment operator. More... | |
Public Member Functions inherited from HashTable< T, Key, Hash > | |
HashTable (const label size=128) | |
Construct given initial table size. More... | |
HashTable (Istream &, const label size=128) | |
Construct from Istream. More... | |
HashTable (const HashTable< T, Key, Hash > &) | |
Copy constructor. More... | |
HashTable (HashTable< T, Key, Hash > &&) | |
Move constructor. More... | |
HashTable (std::initializer_list< Tuple2< Key, T >>) | |
Construct from an initializer list. More... | |
~HashTable () | |
Destructor. More... | |
label | capacity () const |
The size of the underlying table. More... | |
label | size () const |
Return number of elements in table. More... | |
bool | empty () const |
Return true if the hash table is empty. More... | |
bool | found (const Key &) const |
Return true if hashedEntry is found in table. More... | |
iterator | find (const Key &) |
Find and return an iterator set at the hashedEntry. More... | |
const_iterator | find (const Key &) const |
Find and return an const_iterator set at the hashedEntry. More... | |
List< Key > | toc () const |
Return the table of contents. More... | |
List< Key > | sortedToc () const |
Return the table of contents as a sorted list. More... | |
Ostream & | printInfo (Ostream &) const |
Print information. More... | |
bool | insert (const Key &, const T &newElmt) |
Insert a new hashedEntry. More... | |
bool | set (const Key &, const T &newElmt) |
Assign a new hashedEntry, overwriting existing entries. More... | |
bool | erase (const iterator &) |
Erase a hashedEntry specified by given iterator. More... | |
bool | erase (const Key &) |
Erase a hashedEntry specified by the given key. More... | |
label | erase (const UList< Key > &) |
Remove entries given by the listed keys from this HashTable. More... | |
template<class AnyType , class AnyHash > | |
label | erase (const HashTable< AnyType, Key, AnyHash > &) |
Remove entries given by the given keys from this HashTable. More... | |
void | resize (const label newSize) |
Resize the hash table for efficiency. More... | |
void | clear () |
Clear all entries from table. More... | |
void | clearStorage () |
Clear the table entries and the table itself. More... | |
void | shrink () |
Shrink the allocated table to approx. twice number of elements. More... | |
void | transfer (HashTable< T, Key, Hash > &) |
Transfer the contents of the argument table into this table. More... | |
T & | operator[] (const Key &) |
Find and return a hashedEntry. More... | |
const T & | operator[] (const Key &) const |
Find and return a hashedEntry. More... | |
T & | operator() (const Key &) |
Find and return a hashedEntry, create it null if not present. More... | |
void | operator= (const HashTable< T, Key, Hash > &) |
Assignment operator. More... | |
void | operator= (HashTable< T, Key, Hash > &&) |
Move assignment operator. More... | |
void | operator= (std::initializer_list< Tuple2< Key, T >>) |
Assignment to an initializer list. More... | |
bool | operator== (const HashTable< T, Key, Hash > &) const |
Equality. Hash tables are equal if the keys and values are equal. More... | |
bool | operator!= (const HashTable< T, Key, Hash > &) const |
The opposite of the equality operation. Takes linear time. More... | |
iterator | begin () |
Iterator set to the beginning of the HashTable. More... | |
const_iterator | cbegin () const |
const_iterator set to the beginning of the HashTable More... | |
const_iterator | begin () const |
const_iterator set to the beginning of the HashTable More... | |
template<class AnyType , class AnyHash > | |
Foam::label | erase (const HashTable< AnyType, Key, AnyHash > &rhs) |
Public Member Functions inherited from HashTableCore | |
HashTableCore () | |
Construct null. More... | |
ClassName ("HashTable") | |
Define template name and debug. More... | |
Static Public Member Functions | |
static word | wordify (const string &sname) |
Helper function to convert string name into appropriate word. More... | |
Static Public Member Functions inherited from HashTableCore | |
static label | canonicalSize (const label) |
Return a canonical (power-of-two) size. More... | |
static iteratorEnd | cend () |
iteratorEnd set to beyond the end of any HashTable More... | |
static iteratorEnd | end () |
iteratorEnd set to beyond the end of any HashTable More... | |
Friends | |
Ostream & | operator<< (Ostream &, const graph &) |
Ostream Operator. More... | |
Additional Inherited Members | |
Public Types inherited from HashPtrTable< curve > | |
typedef HashTable< curve *, word, string::hash >::iterator | iterator |
typedef HashTable< curve *, word, string::hash >::const_iterator | const_iterator |
Public Types inherited from HashTable< T, Key, Hash > | |
typedef T | value_type |
Type of values the HashTable contains. More... | |
typedef T & | reference |
Type that can be used for storing into HashTable::value_type. More... | |
typedef const T & | const_reference |
Type that can be used for storing into constant. More... | |
typedef label | size_type |
The type that can represent the size of a HashTable. More... | |
Static Public Attributes inherited from HashTableCore | |
static const label | maxTableSize |
Maximum allowable table size. More... | |
Class to create, store and output qgraph files.
graph | ( | const string & | title, |
const string & | xName, | ||
const string & | yName, | ||
const scalarField & | x | ||
) |
Construct from title and labels (no curves)
Definition at line 79 of file graph.C.
Referenced by graph::graph(), and graph::wordify().
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 94 of file graph.C.
References curve::curveStyle::CONTINUOUS, graph::graph(), and Foam::vtkWriteOps::insert().
|
inline |
Definition at line 149 of file graph.H.
Referenced by gnuplotGraph::write(), and xmgrGraph::write().
|
inline |
Definition at line 154 of file graph.H.
Referenced by gnuplotGraph::write(), jplotGraph::write(), and xmgrGraph::write().
|
inline |
Definition at line 159 of file graph.H.
Referenced by gnuplotGraph::write(), and xmgrGraph::write().
|
inline |
Definition at line 165 of file graph.H.
Referenced by Foam::kShellIntegration(), noiseFFT::Ldelta(), noiseFFT::Lf(), engineValve::lift(), noiseFFT::Pdelta(), gnuplotGraph::write(), and xmgrGraph::write().
|
inline |
Definition at line 170 of file graph.H.
References graph::y().
const Foam::scalarField & y | ( | ) | const |
Definition at line 137 of file graph.C.
References HashTable< T, Key, Hash >::begin(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, and HashTable< T, Key, Hash >::size().
Referenced by noiseFFT::Ldelta(), noiseFFT::Lf(), engineValve::lift(), noiseFFT::Lsum(), noiseFFT::Pdelta(), and graph::x().
Foam::scalarField & y | ( | ) |
Definition at line 150 of file graph.C.
References HashTable< T, Key, Hash >::begin(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, graph::writer::New(), and HashTable< T, Key, Hash >::size().
void writeTable | ( | Ostream & | os | ) | const |
Write out graph data as a simple table.
Definition at line 206 of file graph.C.
References Foam::endl(), forAll, forAllConstIter(), Foam::setw(), and token::SPACE.
Referenced by Foam::operator<<(), rawGraph::write(), jplotGraph::write(), and graph::writer::~writer().
Write graph to stream in given format.
Definition at line 221 of file graph.C.
References graph::writer::New().
Referenced by Foam::makeGraph(), graph::write(), and graph::writer::~writer().
Write graph to file in given path-name and format.
Definition at line 227 of file graph.C.
References Foam::endl(), IOstream::good(), OFstream::name(), graph::writer::New(), WarningInFunction, and graph::write().
Write graph to file in given path, name and format.
Definition at line 247 of file graph.C.
References Foam::mkDir(), and graph::write().
|
static |
Helper function to convert string name into appropriate word.
Definition at line 44 of file graph.C.
References curve::curveStyle::CONTINUOUS, forAll, graph::graph(), Foam::vtkWriteOps::insert(), string::replace(), List< T >::size(), and y.
Referenced by graph::writer::~writer().
Ostream Operator.
Referenced by graph::writer::~writer().