|
Correlation 4.10.0
An Analysis Tool for Liquids and for Amorphous Solids
|
Manages the writing of distribution function data to CSV files. More...
#include <CSVWriter.hpp>


Public Member Functions | |
| CSVWriter ()=default | |
| std::string | getName () const override |
| Returns the display name of the format (e.g., "HDF5", "CSV"). | |
| std::vector< std::string > | getExtensions () const override |
| Returns a list of supported file extensions (e.g., {".h5"}, {".csv"}). | |
| void | write (const std::string &base_path, const correlation::analysis::DistributionFunctions &dists, bool smoothing) const override |
| Writes the distribution function data to file(s). | |
| Public Member Functions inherited from correlation::writers::BaseWriter | |
| BaseWriter ()=default | |
| virtual | ~BaseWriter ()=default |
| BaseWriter (const BaseWriter &)=delete | |
| BaseWriter & | operator= (const BaseWriter &)=delete |
| BaseWriter (BaseWriter &&)=delete | |
| BaseWriter & | operator= (BaseWriter &&)=delete |
Static Public Member Functions | |
| static void | writeAllCSVs (const std::string &base_path, const correlation::analysis::DistributionFunctions &dists, bool write_smoothed=false) |
| Writes all available histograms to appropriately named CSV files. | |
| static void | writeHistogramToStream (std::ostream &out_stream, const correlation::analysis::Histogram &hist, const correlation::analysis::Histogram *raw_companion=nullptr) |
| Writes a single histogram and its smoothed companion to an output stream (CSV format). | |
Static Private Member Functions | |
| static void | writeHistogramToCSV (const std::string &filename, const correlation::analysis::Histogram &hist, const correlation::analysis::Histogram *raw_companion=nullptr) |
| The core implementation for writing a single histogram and it's smoothed histograms to a single CSV file. | |
Manages the writing of distribution function data to CSV files.
This class takes a DistributionFunctions object and provides methods to write the calculated histograms (both raw and smoothed) to disk in a well-formatted, data-driven way.
|
default |
|
inlineoverridevirtual |
Returns a list of supported file extensions (e.g., {".h5"}, {".csv"}).
Implements correlation::writers::BaseWriter.
|
inlineoverridevirtual |
Returns the display name of the format (e.g., "HDF5", "CSV").
Implements correlation::writers::BaseWriter.
|
inlineoverridevirtual |
Writes the distribution function data to file(s).
| base_path | The base name for the output files. |
| dists | The DistributionFunctions object containing the data. |
| smoothing | Whether to include smoothed data. |
Implements correlation::writers::BaseWriter.

|
static |
Writes all available histograms to appropriately named CSV files.
For each histogram in the DistributionFunctions object (e.g., "g(r)"), this method will create a corresponding CSV file (e.g., "base_path_g.csv").
| base_path | The base name for the output files (e.g., "output/my_sample"). |
| dists | The DistributionFunctions object containing the data. |
| write_smoothed | If true, also writes smoothed data to separate files (e.g., "base_path_g_smoothed.csv"). |


|
staticprivate |
The core implementation for writing a single histogram and it's smoothed histograms to a single CSV file.
| filename | The full path of the file to write. |
| hist | The Histogram data structure to write. |
| raw_companion | Optional pointer to a raw-count companion histogram (e.g. PAD_raw for PAD). When non-null, its partials are prepended as {key}_raw columns before the normalized data. |


|
static |
Writes a single histogram and its smoothed companion to an output stream (CSV format).
| out_stream | Output stream. |
| hist | The Histogram data structure. |
| raw_companion | Optional raw companion histogram. |
