From 88957ce8056f48aa451f8ff93c532c20759d9792 Mon Sep 17 00:00:00 2001 From: Brett Laptop Date: Tue, 28 Jan 2025 15:25:47 -0500 Subject: [PATCH] little bit more docs --- CMakeLists.txt | 2 +- examples/symbolic_regression.h | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bd682e0..e075be8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,7 +27,7 @@ macro(compile_options target_name) sanitizers(${target_name}) endmacro() -project(blt-gp VERSION 0.3.32) +project(blt-gp VERSION 0.3.33) include(CTest) diff --git a/examples/symbolic_regression.h b/examples/symbolic_regression.h index bff2ae1..232c379 100644 --- a/examples/symbolic_regression.h +++ b/examples/symbolic_regression.h @@ -84,7 +84,15 @@ namespace blt::gp::example void setup_operations() { BLT_DEBUG("Setup Types and Operators"); - static operation_t add{[](const float a, const float b) { return a + b; }, "add"}; + static operation_t add{ + // this is the function used by the operation + [](const float a, const float b) + { + return a + b; + }, + // this name is optional and is used if you print an individual + "add" + }; static operation_t sub([](const float a, const float b) { return a - b; }, "sub"); static operation_t mul([](const float a, const float b) { return a * b; }, "mul"); static operation_t pro_div([](const float a, const float b) { return b == 0.0f ? 0.0f : a / b; }, "div");