Dynamic Neural Field Composer 0.0.0
A C++20 library and interactive application for building and simulating Dynamic Neural Field (DNF) architectures.
Loading...
Searching...
No Matches
heatmap.h
Go to the documentation of this file.
1#pragma once
2
3#include "plot.h"
4
5namespace dnf_composer
6{
8 {
11 bool autoDimensions; // infer rows/cols from data size each frame
12 int hintRows = 0; // set by Visualization when element sizes are known
13 int hintCols = 0;
14
16 HeatmapParameters(double scaleMin, double scaleMax);
17 std::string toString() const override;
18 bool operator==(const HeatmapParameters& other) const;
19 };
20
21 class Heatmap : public Plot
22 {
23 HeatmapParameters heatmapParameters;
24 public:
25 explicit Heatmap(const PlotCommonParameters& parameters =
27 {0.0, 100.0, 0.0, 100.0, 1.0, 1.0},
28 PlotAnnotations{"Heatmap plot", "Spatial dimension output", "Spatial dimension input"}},
29 const HeatmapParameters& heatmapParameters = HeatmapParameters());
30
31 void setScale(double min, double max);
32 std::pair<double, double> getScale() const;
33 void setDimensionHint(int rows, int cols);
34 std::string toString() const override;
35 void render(const std::vector<std::vector<double>*>& data, const std::vector<std::string>& legends) override;
36 };
37}
Definition heatmap.h:22
void setScale(double min, double max)
Definition heatmap.cpp:37
void render(const std::vector< std::vector< double > * > &data, const std::vector< std::string > &legends) override
Render the plot using the provided data and legends.
Definition heatmap.cpp:71
std::string toString() const override
Definition heatmap.cpp:61
void setDimensionHint(int rows, int cols)
Definition heatmap.cpp:55
std::pair< double, double > getScale() const
Definition heatmap.cpp:50
Abstract base class for all renderable plots.
Definition plot.h:15
Definition application.h:20
Definition heatmap.h:8
double scaleMax
Definition heatmap.h:9
bool autoScale
Definition heatmap.h:10
HeatmapParameters()
Definition heatmap.cpp:6
bool operator==(const HeatmapParameters &other) const
Definition heatmap.cpp:24
int hintRows
Definition heatmap.h:12
double scaleMin
Definition heatmap.h:9
bool autoDimensions
Definition heatmap.h:11
std::string toString() const override
Definition heatmap.cpp:14
int hintCols
Definition heatmap.h:13
Definition plot_parameters.h:26
Definition plot_parameters.h:48
Definition plot_parameters.h:62