/**++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * * PANIC * Portable Algorithms and Numerics In C++ * * Scientific computing from scratch, with feeling. * * Copyright (c) 2026 Michelle Bausager * * This file is part of PANIC. * * PANIC is free software licensed under the GNU General Public License v3.0 or later. * You may redistribute and/or modify it under the terms of the GPL. * * PANIC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the LICENSE file for the full license text. * * SPDX-License-Identifier: GPL-3.0-or-later * *++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * * Project Name: PANIC * Module Name: * File Name: * Revision: 0.1.0 * Date: * Author: Michelle Bausager * * Description: * * *++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ //--------------------------------------------------------------------------------------------------------------------------- // INCLUDE DESCRIPTION //--------------------------------------------------------------------------------------------------------------------------- #include // std::cout, std::endl #include // include types to use #include // Math constants #include #include #include //--------------------------------------------------------------------------------------------------------------------------- // DEFINE DESCRIPTION //--------------------------------------------------------------------------------------------------------------------------- // difinitions like: // #define TEST_FALG 1 //--------------------------------------------------------------------------------------------------------------------------- // VARIABLE DESCRIPTION //--------------------------------------------------------------------------------------------------------------------------- // Variable difinition like: panic::real_t x = 2.4; //--------------------------------------------------------------------------------------------------------------------------- // FUNCTION PROTOTYPE //--------------------------------------------------------------------------------------------------------------------------- // Function prototypes like: // static void TestLeds(void); int main(void) { panic::tensor::real_vector a(3); panic::tensor::uint_vector b(3); panic::tensor::int_vector c(10); a[2] = 1.2; b[2] = 3; c[2] = -3; panic::io::print_vector(a); panic::io::print_vector(b); panic::io::print_vector(c); std::cout << a[100] << std::endl; std::cout << a.at(100) << std::endl; std::cout << panic::constants::pi << std::endl; std::cout << 1.23249238423847 << std::endl; panic::tensor::real_matrix A(2,2, 1); panic::tensor::uint_matrix B(2,2, 2); panic::tensor::int_matrix C(2,2, 3); A(1,0) = 1.2; B(1,0) = 3; C(1,0) = -2; panic::io::print_matrix(A); panic::io::print_matrix(B); panic::io::print_matrix(C); return 0; }