Installation
Install the LOWESS library for your preferred language.
Each prebuilt platform archive contains that platform's library and the matching C++ and C headers. Starting with the next C++ release, archives also include dependency-license notices generated from the committed workspace lockfile. Download and extract the archive for your target; its files are placed in the current directory.
Pre-built Binaries (Linux (x64))
wget https://github.com/thisisamirv/lowess-project/releases/latest/download/libfastlowess-linux-x64.tar
tar -xf libfastlowess-linux-x64.tar
g++ -o myapp myapp.cpp -L. -lfastlowess-linux-x64
Pre-built Binaries (Linux (ARM64))
wget https://github.com/thisisamirv/lowess-project/releases/latest/download/libfastlowess-linux-arm64.tar
tar -xf libfastlowess-linux-arm64.tar
g++ -o myapp myapp.cpp -L. -lfastlowess-linux-arm64
Pre-built Binaries (Linux (x86), 32-bit)
wget https://github.com/thisisamirv/lowess-project/releases/latest/download/libfastlowess-linux-x86.tar
tar -xf libfastlowess-linux-x86.tar
g++ -m32 -std=c++17 -I. -o myapp myapp.cpp -L. -lfastlowess-linux-x86
Pre-built Binaries (Linux (ARMv7), hard-float)
wget https://github.com/thisisamirv/lowess-project/releases/latest/download/libfastlowess-linux-armv7.tar
tar -xf libfastlowess-linux-armv7.tar
arm-linux-gnueabihf-g++ -std=c++17 -I. -o myapp myapp.cpp -L. -lfastlowess-linux-armv7
Pre-built Binaries (Linux (x64), musl/Alpine)
wget https://github.com/thisisamirv/lowess-project/releases/latest/download/libfastlowess-linux-x64-musl.tar
tar -xf libfastlowess-linux-x64-musl.tar
g++ -o myapp myapp.cpp -L. -lfastlowess-linux-x64-musl
Pre-built Binaries (Linux (ARM64), musl/Alpine)
wget https://github.com/thisisamirv/lowess-project/releases/latest/download/libfastlowess-linux-arm64-musl.tar
tar -xf libfastlowess-linux-arm64-musl.tar
g++ -o myapp myapp.cpp -L. -lfastlowess-linux-arm64-musl
Pre-built Binaries (macOS (x64))
curl -LO https://github.com/thisisamirv/lowess-project/releases/latest/download/libfastlowess-macos-x64.tar
tar -xf libfastlowess-macos-x64.tar
clang++ -o myapp myapp.cpp -L. -lfastlowess-macos-x64
Pre-built Binaries (macOS (ARM64))
curl -LO https://github.com/thisisamirv/lowess-project/releases/latest/download/libfastlowess-macos-arm64.tar
tar -xf libfastlowess-macos-arm64.tar
clang++ -o myapp myapp.cpp -L. -lfastlowess-macos-arm64
Pre-built Binaries (Android)
Choose the shared library matching the Android ABI used by your application:
| ABI | Release archive |
arm64-v8a | libfastlowess-android-arm64-v8a.tar |
armeabi-v7a | libfastlowess-android-armeabi-v7a.tar |
x86 | libfastlowess-android-x86.tar |
x86_64 | libfastlowess-android-x86_64.tar |
Download and extract the archive for the ABI being built by the Android NDK. It contains the .so and all three headers.
Pre-built Binaries (iOS)
The release provides static archives for physical devices and simulators. Use only the archive matching the active Xcode destination:
| Destination | Rust target | Release archive |
| iOS device (arm64) | aarch64-apple-ios | libfastlowess-ios-arm64.tar |
| iOS simulator (Apple silicon) | aarch64-apple-ios-sim | libfastlowess-ios-simulator-arm64.tar |
| iOS simulator (Intel) | x86_64-apple-ios | libfastlowess-ios-simulator-x86_64.tar |
Download and extract the archive matching the active Xcode destination. It contains the static library and all three headers.
Pre-built Binaries (Windows (x64))
wget https://github.com/thisisamirv/lowess-project/releases/latest/download/libfastlowess-windows-x64-msvc.tar
tar -xf libfastlowess-windows-x64-msvc.tar
cl /std:c++17 myapp.cpp /link fastlowess-win32-x64.lib
Pre-built Binaries (Windows (ARM64))
wget https://github.com/thisisamirv/lowess-project/releases/latest/download/libfastlowess-windows-arm64.tar
tar -xf libfastlowess-windows-arm64.tar
cl /std:c++17 myapp.cpp /link fastlowess-win32-arm64.lib
Pre-built Binaries (Windows (x64), MinGW-w64)
wget https://github.com/thisisamirv/lowess-project/releases/latest/download/libfastlowess-windows-x64-gnu.tar
tar -xf libfastlowess-windows-x64-gnu.tar
g++ -std=c++17 -I. -o myapp myapp.cpp -L. -lfastlowess-win32-x64-gnu
From Source
# Install Rust first: https://rustup.rs/
git clone https://github.com/thisisamirv/lowess-project
cd lowess-project/bindings/cpp
# Build the library
cargo build --release
# Headers are at: include/fastlowess.hpp (C++)
# Library is at: target/release/libfastlowess_cpp.so (Linux)
# target/release/libfastlowess_cpp.dylib (macOS)
# target/release/fastlowess_cpp.dll (Windows)
From conda-forge
conda install -c conda-forge libfastlowess
From Spack
spack install fastlowess-cpp
The recipe links its homepage to the C++ documentation and checks that the installed headers and library directory exist. Recipes with the standalone smoke test can compile and run a small linear fit against the installed library:
spack test run --alias fastlowess-cpp-smoke fastlowess-cpp
spack test results -l fastlowess-cpp-smoke
Verify Installation
#include <iostream>
#include <vector>
int main() {
std::vector<double> x = {1.0, 2.0, 3.0, 4.0, 5.0};
std::vector<double> y = {2.0, 4.1, 5.9, 8.2, 9.8};
std::cout << "Installed successfully!" << std::endl;
return 0;
}
T & value() &
Definition fastlowess.hpp:150
Batch LOWESS model.
Definition fastlowess.hpp:804
Expected< LowessResult > fit(const std::vector< double > &x_values, const std::vector< double > &y_values, const std::vector< double > &custom_weights={})
Definition fastlowess.hpp:865
C++ wrapper for fastLowess library.
Check the Header and Library Versions
Cargo and CMake generate fastlowess_version.h from package metadata. Download it and fastlowess.h alongside fastlowess.hpp when using prebuilt binaries. The version header can be included on its own for compile-time checks, without linking the native library:
"This application requires fastlowess-cpp 4 or later");
int main() {}
#define FASTLOWESS_CPP_VERSION_MAJOR
Definition fastlowess_version.h:4
The macros FASTLOWESS_CPP_VERSION_MAJOR, FASTLOWESS_CPP_VERSION_MINOR, FASTLOWESS_CPP_VERSION_PATCH, and FASTLOWESS_CPP_VERSION_STRING describe the headers used to compile your application. fastlowess.hpp includes this header automatically.
Use fastlowess_version() to identify the native library loaded at runtime:
#include <iostream>
int main() {
std::cout << "Loaded library version: " << fastlowess_version() << '\n';
}
#define FASTLOWESS_CPP_VERSION_STRING
Definition fastlowess_version.h:7
Header version: 5.1.0
Loaded library version: 5.1.0