Coder Social home page Coder Social logo

basiclinearalgebra's Introduction

Basic Linear Algebra

Is a library for representing matrices and doing matrix math on arduino. It provides a Matrix class which can be used to declare 2D matrices of arbitrary height, width, type and even storage policy (see below). The matrix overrides the +, +=, -, -=, *, *= and = operators so they can be used naturally in algebraic expressions. It also supports a few more advanced operations including matrix inversion. It doesn't use malloc so it's not prone to leaks or runtime errors and it even checks whether the dimensions of two matrices used in an expression are compatible at compile time (so it'll let you know when you try to add together two matrices with different dimensions for example).

How it Works

The Basics

This library defines a class Matrix which you can use to represent two dimensional matrices of arbitrary dimensions.

For example, you can declare a 3x2 matrix like so:

Matrix<3,2> A;

Or a 6x3 Matrix like so:

Matrix<6,3> B;

You can do lots of different things with matrices including basic algebra:

Matrix<6,2> C = B * A;

As well as some more advanced operations like Transposition, Concatenation and Inversion. For more on the basic useage of matrices have a look at the HowToUse example.

Changing the Element Type

By default, matrices are full of floats. If that doesn't suit your application, then you can specify what kind of datatype you'd like your matrix to be made of by passing it in to the class's parameters just after the dimensions like so:

Matrix<3,2,int> D;

Not only that, the datatype needn't be just a POD (float, bool, int etc) but it can be any class or struct you define too. So if you'd like to do matrix math with your own custom class then you can, so long as it implements the operators for addition, subtraction etc. For example, if you wanted, you could write a class to hold an imaginary number and then you could make a matrix out of it like so:

Matrix<2,2,ImaginaryNumber> Im;

This turned out to have intersting implications when you specify the element type as another matrix. For more on that, have a look at the Tensor example.

Changing the Way Elements are Retrieved

By default, matrices store their elements in an C-style array which is kept inside the object. Every time you access one of the elements directly using the () operator or indirectly when you do some algebra, the matrix returns the appropriate element from that array.

At times, it's handy to be able to instruct the matrix to do something else when asked to retrieve an element at a particular index. For example if you know that your matrix is very sparse (only a few elements are non-zero) then you can save yourself some memory and just store the non-zero elements and return zero when asked for anything else.

If you like, you can override the way in which the elements for the matrix are stored. For example, we can define a 2000x3000 matrix with a sparse storage policy like so:

SparseMatrix<2000, 3000, 100, float> > sparseMatrix;

In this case the SparseMatrix is a Matrix which provides storage for 100 elements which are assumed to be embedded in a matrix having 2000 rows and 3000 columns. You can find the implementation for this class in the ElementStorage.h file, but long story short, it's a hashmap.

You can implement the custom matrices in whatever way you like so long as it returns some element when passed a row/column index. For more on how to implement such a matrix, have a look at the CustomMatrix example.

Reference Matrices

One particularly useful part of being able to override the way matrices access their elements is that it lets us define reference matrices. Reference matrices don't actually own any memory themselves, instead they return the elements of another matrix when we access them. To create a reference matrix you can use the Submatrix method of the matrix class like so:

auto ref = A.Submatrix<2,2>(1,0);

Here, ref is a 2x2 matrix which returns the elements in the lower 2 rows of the 3x2 matrix A defined above.

In general, reference matrices are useful for isolating a subsection of a larger matrix. That lets us use just that section in matrix operations with other matrices of compatible dimensions, or to collectively assign a value to a particular section of a matrix. For more information on reference matrices check out the References example.

basiclinearalgebra's People

Contributors

akshay5312 avatar brand17 avatar grassjelly avatar insalt-glitch avatar keithmgould avatar rafalroszkowski avatar thomascent avatar tomstewart avatar tomstewart89 avatar vorpalblade avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

basiclinearalgebra's Issues

Doesn't Compile on Native

I've been trying to setup some unit testing/mocking for my code that will run using PlatformIO's native platform, but this library causes my code not to compile.

Specifically, it is a reference to max in the global namespace, which appears to exist when compiling for arduino (or the rp2040 in my case), but not when compiling for native (see the full error below). I think it would make sense for this library to work on native since it shouldn't require anything hardware specific, and it is reasonable to want to test math heavy parts of the code.

I'm not actually sure if this is a trivial fix, it feels like it would be, but I haven't yet found a way to get it to compile on native without referencing std somewhere (which I presume would make it not work on arduino).

Thanks!

Full error:

.pio/libdeps/native/BasicLinearAlgebra/impl/NotSoBasicLinearAlgebra.h:64:31: error: 'max' was not declared in this scope; did you mean 'std::max'?
   64 |             largest_elem = max(this_elem, largest_elem);
      |                            ~~~^~~~~~~~~~~~~~~~~~~~~~~~~
      |                            std::max
In file included from /usr/include/c++/13.2/bits/hashtable_policy.h:36,
                 from /usr/include/c++/13.2/bits/hashtable.h:35,
                 from /usr/include/c++/13.2/bits/unordered_map.h:33,
                 from /usr/include/c++/13.2/unordered_map:41,
                 from .pio/libdeps/native/ArduinoFake/src/ArduinoFake.h:8,
                 from .pio/libdeps/native/ArduinoFake/src/Arduino.h:1,
                 from src/EKF/EKF.h:3:
/usr/include/c++/13.2/bits/stl_algobase.h:303:5: note: 'std::max' declared here
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
*** [.pio/build/native/src/EKF/EKF.o] Error 1
Building stage has failed, see errors above. Use `pio test -vvv` option to enable verbose output.

Missing const qualifier on unary operator-

Matrix<rows,cols,Array<rows,cols,typename MemT::elem_t> > operator-() should have a const qualifier, currently you cannot use the negation operator on a const matrix (or on a temporary).

After the latest update, I'm getting two template-related compilation errors

Using board 'micro' from platform in folder: /Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3
Using core 'arduino' from platform in folder: /Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3
Detecting libraries used...
/Users/mark/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MICRO -DARDUINO_ARCH_AVR -DUSB_VID=0x2341 -DUSB_PID=0x8037 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"Arduino Micro\"" -I/Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/cores/arduino -I/Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/variants/micro /var/folders/g2/0wzmz58970bgvfl36px8xqs00000gn/T/arduino-sketch-F9F4681ED34D8D20D5EEE990F4B86CE1/sketch/joycon-firmware.ino.cpp -o /dev/null
Alternatives for Wire.h: [[email protected]]
ResolveLibrary(Wire.h)
  -> candidates: [[email protected]]
/Users/mark/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MICRO -DARDUINO_ARCH_AVR -DUSB_VID=0x2341 -DUSB_PID=0x8037 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"Arduino Micro\"" -I/Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/cores/arduino -I/Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/variants/micro -I/Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/libraries/Wire/src /var/folders/g2/0wzmz58970bgvfl36px8xqs00000gn/T/arduino-sketch-F9F4681ED34D8D20D5EEE990F4B86CE1/sketch/joycon-firmware.ino.cpp -o /dev/null
Alternatives for DFRobotIRPosition.h: [[email protected]]
ResolveLibrary(DFRobotIRPosition.h)
  -> candidates: [[email protected]]
/Users/mark/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MICRO -DARDUINO_ARCH_AVR -DUSB_VID=0x2341 -DUSB_PID=0x8037 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"Arduino Micro\"" -I/Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/cores/arduino -I/Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/variants/micro -I/Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/libraries/Wire/src -I/Users/mark/Documents/Arduino/libraries/DFRobotIRPosition /var/folders/g2/0wzmz58970bgvfl36px8xqs00000gn/T/arduino-sketch-F9F4681ED34D8D20D5EEE990F4B86CE1/sketch/joycon-firmware.ino.cpp -o /dev/null
Alternatives for AbsMouse.h: [[email protected]]
ResolveLibrary(AbsMouse.h)
  -> candidates: [[email protected]]
/Users/mark/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MICRO -DARDUINO_ARCH_AVR -DUSB_VID=0x2341 -DUSB_PID=0x8037 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"Arduino Micro\"" -I/Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/cores/arduino -I/Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/variants/micro -I/Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/libraries/Wire/src -I/Users/mark/Documents/Arduino/libraries/DFRobotIRPosition -I/Users/mark/Documents/Arduino/libraries/absmouse/src /var/folders/g2/0wzmz58970bgvfl36px8xqs00000gn/T/arduino-sketch-F9F4681ED34D8D20D5EEE990F4B86CE1/sketch/joycon-firmware.ino.cpp -o /dev/null
Alternatives for HID.h: [[email protected]]
ResolveLibrary(HID.h)
  -> candidates: [[email protected]]
/Users/mark/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MICRO -DARDUINO_ARCH_AVR -DUSB_VID=0x2341 -DUSB_PID=0x8037 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"Arduino Micro\"" -I/Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/cores/arduino -I/Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/variants/micro -I/Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/libraries/Wire/src -I/Users/mark/Documents/Arduino/libraries/DFRobotIRPosition -I/Users/mark/Documents/Arduino/libraries/absmouse/src -I/Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/libraries/HID/src /var/folders/g2/0wzmz58970bgvfl36px8xqs00000gn/T/arduino-sketch-F9F4681ED34D8D20D5EEE990F4B86CE1/sketch/joycon-firmware.ino.cpp -o /dev/null
Alternatives for BasicLinearAlgebra.h: [[email protected]]
ResolveLibrary(BasicLinearAlgebra.h)
  -> candidates: [[email protected]]
/Users/mark/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MICRO -DARDUINO_ARCH_AVR -DUSB_VID=0x2341 -DUSB_PID=0x8037 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"Arduino Micro\"" -I/Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/cores/arduino -I/Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/variants/micro -I/Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/libraries/Wire/src -I/Users/mark/Documents/Arduino/libraries/DFRobotIRPosition -I/Users/mark/Documents/Arduino/libraries/absmouse/src -I/Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/libraries/HID/src -I/Users/mark/Documents/Arduino/libraries/BasicLinearAlgebra /var/folders/g2/0wzmz58970bgvfl36px8xqs00000gn/T/arduino-sketch-F9F4681ED34D8D20D5EEE990F4B86CE1/sketch/joycon-firmware.ino.cpp -o /dev/null
/Users/mark/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MICRO -DARDUINO_ARCH_AVR -DUSB_VID=0x2341 -DUSB_PID=0x8037 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"Arduino Micro\"" -I/Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/cores/arduino -I/Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/variants/micro -I/Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/libraries/Wire/src -I/Users/mark/Documents/Arduino/libraries/DFRobotIRPosition -I/Users/mark/Documents/Arduino/libraries/absmouse/src -I/Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/libraries/HID/src -I/Users/mark/Documents/Arduino/libraries/BasicLinearAlgebra /Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/libraries/Wire/src/Wire.cpp -o /dev/null
/Users/mark/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MICRO -DARDUINO_ARCH_AVR -DUSB_VID=0x2341 -DUSB_PID=0x8037 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"Arduino Micro\"" -I/Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/cores/arduino -I/Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/variants/micro -I/Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/libraries/Wire/src -I/Users/mark/Documents/Arduino/libraries/DFRobotIRPosition -I/Users/mark/Documents/Arduino/libraries/absmouse/src -I/Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/libraries/HID/src -I/Users/mark/Documents/Arduino/libraries/BasicLinearAlgebra /Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/libraries/Wire/src/utility/twi.c -o /dev/null
/Users/mark/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MICRO -DARDUINO_ARCH_AVR -DUSB_VID=0x2341 -DUSB_PID=0x8037 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"Arduino Micro\"" -I/Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/cores/arduino -I/Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/variants/micro -I/Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/libraries/Wire/src -I/Users/mark/Documents/Arduino/libraries/DFRobotIRPosition -I/Users/mark/Documents/Arduino/libraries/absmouse/src -I/Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/libraries/HID/src -I/Users/mark/Documents/Arduino/libraries/BasicLinearAlgebra /Users/mark/Documents/Arduino/libraries/DFRobotIRPosition/DFRobotIRPosition.cpp -o /dev/null
/Users/mark/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MICRO -DARDUINO_ARCH_AVR -DUSB_VID=0x2341 -DUSB_PID=0x8037 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"Arduino Micro\"" -I/Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/cores/arduino -I/Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/variants/micro -I/Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/libraries/Wire/src -I/Users/mark/Documents/Arduino/libraries/DFRobotIRPosition -I/Users/mark/Documents/Arduino/libraries/absmouse/src -I/Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/libraries/HID/src -I/Users/mark/Documents/Arduino/libraries/BasicLinearAlgebra /Users/mark/Documents/Arduino/libraries/absmouse/src/AbsMouse.cpp -o /dev/null
/Users/mark/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MICRO -DARDUINO_ARCH_AVR -DUSB_VID=0x2341 -DUSB_PID=0x8037 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"Arduino Micro\"" -I/Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/cores/arduino -I/Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/variants/micro -I/Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/libraries/Wire/src -I/Users/mark/Documents/Arduino/libraries/DFRobotIRPosition -I/Users/mark/Documents/Arduino/libraries/absmouse/src -I/Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/libraries/HID/src -I/Users/mark/Documents/Arduino/libraries/BasicLinearAlgebra /Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/libraries/HID/src/HID.cpp -o /dev/null
Generating function prototypes...
/Users/mark/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MICRO -DARDUINO_ARCH_AVR -DUSB_VID=0x2341 -DUSB_PID=0x8037 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"Arduino Micro\"" -I/Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/cores/arduino -I/Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/variants/micro -I/Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/libraries/Wire/src -I/Users/mark/Documents/Arduino/libraries/DFRobotIRPosition -I/Users/mark/Documents/Arduino/libraries/absmouse/src -I/Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/libraries/HID/src -I/Users/mark/Documents/Arduino/libraries/BasicLinearAlgebra /var/folders/g2/0wzmz58970bgvfl36px8xqs00000gn/T/arduino-sketch-F9F4681ED34D8D20D5EEE990F4B86CE1/sketch/joycon-firmware.ino.cpp -o /var/folders/g2/0wzmz58970bgvfl36px8xqs00000gn/T/arduino-sketch-F9F4681ED34D8D20D5EEE990F4B86CE1/preproc/ctags_target_for_gcc_minus_e.cpp
/Users/mark/Library/Arduino15/packages/builtin/tools/ctags/5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives /var/folders/g2/0wzmz58970bgvfl36px8xqs00000gn/T/arduino-sketch-F9F4681ED34D8D20D5EEE990F4B86CE1/preproc/ctags_target_for_gcc_minus_e.cpp
Compiling sketch...
/Users/mark/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MICRO -DARDUINO_ARCH_AVR -DUSB_VID=0x2341 -DUSB_PID=0x8037 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"Arduino Micro\"" -I/Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/cores/arduino -I/Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/variants/micro -I/Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/libraries/Wire/src -I/Users/mark/Documents/Arduino/libraries/DFRobotIRPosition -I/Users/mark/Documents/Arduino/libraries/absmouse/src -I/Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/libraries/HID/src -I/Users/mark/Documents/Arduino/libraries/BasicLinearAlgebra /var/folders/g2/0wzmz58970bgvfl36px8xqs00000gn/T/arduino-sketch-F9F4681ED34D8D20D5EEE990F4B86CE1/sketch/joycon-firmware.ino.cpp -o /var/folders/g2/0wzmz58970bgvfl36px8xqs00000gn/T/arduino-sketch-F9F4681ED34D8D20D5EEE990F4B86CE1/sketch/joycon-firmware.ino.cpp.o
In file included from /Users/mark/repos/lab/joycon/joycon-firmware/joycon-firmware.ino:1:0:
/Users/mark/Documents/Arduino/libraries/BasicLinearAlgebra/NotSoBasicLinearAlgebra.h:14:25: error: expected unqualified-id before 'const'
     inline const T &max(const T &a, const T &b)
                         ^
/Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/cores/arduino/Arduino.h:93:20: note: in definition of macro 'max'
 #define max(a,b) ((a)>(b)?(a):(b))
                    ^
/Users/mark/Documents/Arduino/libraries/BasicLinearAlgebra/NotSoBasicLinearAlgebra.h:14:25: error: expected ')' before 'const'
     inline const T &max(const T &a, const T &b)
                         ^
/Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/cores/arduino/Arduino.h:93:20: note: in definition of macro 'max'
 #define max(a,b) ((a)>(b)?(a):(b))
                    ^
/Users/mark/Documents/Arduino/libraries/BasicLinearAlgebra/NotSoBasicLinearAlgebra.h:14:25: error: expected ')' before 'const'
     inline const T &max(const T &a, const T &b)
                         ^
/Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/cores/arduino/Arduino.h:93:20: note: in definition of macro 'max'
 #define max(a,b) ((a)>(b)?(a):(b))
                    ^
/Users/mark/Documents/Arduino/libraries/BasicLinearAlgebra/NotSoBasicLinearAlgebra.h:14:25: error: expected initializer before 'const'
     inline const T &max(const T &a, const T &b)
                         ^
/Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/cores/arduino/Arduino.h:93:20: note: in definition of macro 'max'
 #define max(a,b) ((a)>(b)?(a):(b))
                    ^
In file included from /Users/mark/repos/lab/joycon/joycon-firmware/joycon-firmware.ino:6:0:
/Users/mark/Documents/Arduino/libraries/BasicLinearAlgebra/BasicLinearAlgebra.h: In instantiation of 'BLA::Matrix<rows, cols, MemT>::Matrix(ARGS ...) [with ARGS = {BLA::Matrix<3, 3, BLA::Array<3, 3, float> >}; int rows = 3; int cols = 1; MemT = BLA::Array<3, 1, float>]':
/Users/mark/Documents/Arduino/libraries/BasicLinearAlgebra/BasicLinearAlgebra.h:310:16:   required from 'BLA::Matrix<rows, operandCols, BLA::Array<rows, operandCols, typename MemT::elem_t> > BLA::Matrix<rows, cols, MemT>::operator*(const BLA::Matrix<cols, operandCols, opMemT>&) const [with int operandCols = 1; opMemT = BLA::Array<3, 1, float>; int rows = 3; int cols = 3; MemT = BLA::Array<3, 3, float>; typename MemT::elem_t = float]'
/Users/mark/repos/lab/joycon/joycon-firmware/joycon-firmware.ino:246:33:   required from here
/Users/mark/Documents/Arduino/libraries/BasicLinearAlgebra/BasicLinearAlgebra.h:63:44: error: no matching function for call to 'BLA::Matrix<3>::FillRowMajor(BLA::Matrix<3, 3>&)'
         Matrix(ARGS... args) { FillRowMajor(args...); }
                                ~~~~~~~~~~~~^~~~~~~~~
/Users/mark/Documents/Arduino/libraries/BasicLinearAlgebra/BasicLinearAlgebra.h:91:14: note: candidate: template<class ... TAIL> void BLA::Matrix<rows, cols, MemT>::FillRowMajor(typename MemT::elem_t, TAIL ...) [with TAIL = {TAIL ...}; int rows = 3; int cols = 1; MemT = BLA::Array<3, 1, float>]
         void FillRowMajor(typename MemT::elem_t head, TAIL... tail);
              ^~~~~~~~~~~~
/Users/mark/Documents/Arduino/libraries/BasicLinearAlgebra/BasicLinearAlgebra.h:91:14: note:   template argument deduction/substitution failed:
/Users/mark/Documents/Arduino/libraries/BasicLinearAlgebra/BasicLinearAlgebra.h:63:44: note:   cannot convert 'args#0' (type 'BLA::Matrix<3, 3>') to type 'BLA::Array<3, 1, float>::elem_t {aka float}'
         Matrix(ARGS... args) { FillRowMajor(args...); }
                                ~~~~~~~~~~~~^~~~~~~~~
/Users/mark/Documents/Arduino/libraries/BasicLinearAlgebra/BasicLinearAlgebra.h:92:14: note: candidate: void BLA::Matrix<rows, cols, MemT>::FillRowMajor() [with int rows = 3; int cols = 1; MemT = BLA::Array<3, 1, float>]
         void FillRowMajor() {}
              ^~~~~~~~~~~~
/Users/mark/Documents/Arduino/libraries/BasicLinearAlgebra/BasicLinearAlgebra.h:92:14: note:   candidate expects 0 arguments, 1 provided
Using library Wire at version 1.0 in folder: /Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/libraries/Wire 
Using library DFRobotIRPosition at version 1.0.2 in folder: /Users/mark/Documents/Arduino/libraries/DFRobotIRPosition 
Using library absmouse at version 1.0.0 in folder: /Users/mark/Documents/Arduino/libraries/absmouse 
Using library HID at version 1.0 in folder: /Users/mark/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/libraries/HID 
Using library BasicLinearAlgebra at version 2.3 in folder: /Users/mark/Documents/Arduino/libraries/BasicLinearAlgebra 
Compilation error: Error: 2 UNKNOWN: exit status 1

I can easily salvage the one on the max function, but the other is a bit too foreign for me atm.
My knowledge of C compiling isn't all too great. Could this be an issue specific to some Arduino compilers, like in this case AVR's?

Initialize Matrix to 0

I would expect you could initialize a Matrix with zeros like this;
BLA::Matrix<3, 3> A = {0};
Unfortunatly this doesn't seem to be the case. All subsequent values stay uninitialized . I'm aware the "HowToUse" doesn't explicitly say this should possible, but since you can do this
BLA::Matrix<3, 3> B = {6.54, 3.66, 2.95, 3.22, 7.54, 5.12, 8.98, 9.99, 1.56};
I thought the afor mentioned way would also work.

Otherwise the Library works as advertised :) Keep up the good work!

Examples not working

Hello,

I am trying to run the examples as provided but I am getting some errors. My Arduino IDE version is 1.0.5-r2

In "HowToUse.ino" I get the following error on line 35:

ย ย Matrix<3,3> B = {6.54, 3.66, 2.95,
ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย 3.22,ย 7.54,ย 5.12,
ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย 8.98,ย 9.99,ย 1.56};

Error message at compilation is

HowToUse.ino: In function 'void setup()': HowToUse:35: error: braces around initializer for non-aggregate type 'Matrix<3, 3, Array<3, 3, float> >'

Arduino Due Support

Dear Tom,

It is possible to use the library on Arduino DUE?

I am trying, but I have problems to compile.

Thanks!

Note that the F matrix in the example clashes with the F() macro

BLA::Matrix<3, 3> F;
float dt;
x += (F * x + G * u) * dt;

If you were to try to access F(1,1) you will get an error:

error: macro "F" passed 2 arguments, but takes just 1
     Serial << F(1,1);
                    ^

Or F(1) gets you:

/arduino/hardware/avr/1.8.6/cores/arduino/WString.h:38:74: error: initializer fails to determine size of '__c'
 #define F(string_literal) (reinterpret_cast<const __FlashStringHelper *>(PSTR(string_literal)))
                                                                          ^
sketch.ino:99:15: note: in expansion of macro 'F'
     Serial << F(1);

The F macro is defined here:

https://github.com/arduino/ArduinoCore-avr/blob/master/cores/arduino/WString.h#L38

There's not much to be done, other than avoid F as a variable name.

Doesn't compile for ESP32 Dev Board

In file included from d:\Users\cflem\Documents\Arduino\libraries\BasicLinearAlgebra/BasicLinearAlgebra.h:10,
from C:\Users\cflem\AppData\Local\Temp.arduinoIDE-unsaved202467-3320-15y8msi.qryx\HowToUse\HowToUse.ino:1:
d:\Users\cflem\Documents\Arduino\libraries\BasicLinearAlgebra/ElementStorage.h:136:43: error: expected unqualified-id before 'const'
136 | HorizontalConcat<LeftType, RightType>(const LeftType &l, const RightType &r) : left(l), right(r) {}
| ^~~~~
d:\Users\cflem\Documents\Arduino\libraries\BasicLinearAlgebra/ElementStorage.h:136:43: error: expected ')' before 'const'
136 | HorizontalConcat<LeftType, RightType>(const LeftType &l, const RightType &r) : left(l), right(r) {}
| ~^~~~~
| )
d:\Users\cflem\Documents\Arduino\libraries\BasicLinearAlgebra/ElementStorage.h:151:41: error: expected unqualified-id before 'const'
151 | VerticalConcat<TopType, BottomType>(const TopType &t, const BottomType &b) : top(t), bottom(b) {}
| ^~~~~
d:\Users\cflem\Documents\Arduino\libraries\BasicLinearAlgebra/ElementStorage.h:151:41: error: expected ')' before 'const'
151 | VerticalConcat<TopType, BottomType>(const TopType &t, const BottomType &b) : top(t), bottom(b) {}
| ~^~~~~
| )
In file included from d:\Users\cflem\Documents\Arduino\libraries\BasicLinearAlgebra/BasicLinearAlgebra.h:181:
d:\Users\cflem\Documents\Arduino\libraries\BasicLinearAlgebra/impl/BasicLinearAlgebra.h: In instantiation of 'BLA::HorizontalConcat<DerivedType, OperandType> BLA::operator||(const MatrixBase<DerivedType, Rows, DerivedType::Cols, DType>&, const MatrixBase<OperandType, Rows, OperandType::Cols, DType>&) [with DerivedType = Matrix<3, 3>; OperandType = Matrix<3, 3>; int Rows = 3; DType = float]':
C:\Users\cflem\AppData\Local\Temp.arduinoIDE-unsaved202467-3320-15y8msi.qryx\HowToUse\HowToUse.ino:70:39: required from here
d:\Users\cflem\Documents\Arduino\libraries\BasicLinearAlgebra/impl/BasicLinearAlgebra.h:208:12: error: no matching function for call to 'BLA::HorizontalConcat<BLA::Matrix<3, 3>, BLA::Matrix<3, 3> >::HorizontalConcat(const BLA::Matrix<3, 3>&, const BLA::Matrix<3, 3>&)'
208 | return HorizontalConcat<DerivedType, OperandType>(static_cast<const DerivedType &>(left),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
209 | static_cast<const OperandType &>(right));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
d:\Users\cflem\Documents\Arduino\libraries\BasicLinearAlgebra/ElementStorage.h:130:8: note: candidate: 'constexpr BLA::HorizontalConcat<BLA::Matrix<3, 3>, BLA::Matrix<3, 3> >::HorizontalConcat(const BLA::HorizontalConcat<BLA::Matrix<3, 3>, BLA::Matrix<3, 3> >&)'
130 | struct HorizontalConcat : public MatrixBase<HorizontalConcat<LeftType, RightType>, LeftType::Rows,
| ^~~~~~~~~~~~~~~~
d:\Users\cflem\Documents\Arduino\libraries\BasicLinearAlgebra/ElementStorage.h:130:8: note: candidate expects 1 argument, 2 provided
d:\Users\cflem\Documents\Arduino\libraries\BasicLinearAlgebra/ElementStorage.h:130:8: note: candidate: 'constexpr BLA::HorizontalConcat<BLA::Matrix<3, 3>, BLA::Matrix<3, 3> >::HorizontalConcat(BLA::HorizontalConcat<BLA::Matrix<3, 3>, BLA::Matrix<3, 3> >&&)'
d:\Users\cflem\Documents\Arduino\libraries\BasicLinearAlgebra/ElementStorage.h:130:8: note: candidate expects 1 argument, 2 provided
d:\Users\cflem\Documents\Arduino\libraries\BasicLinearAlgebra/impl/BasicLinearAlgebra.h: In instantiation of 'BLA::VerticalConcat<DerivedType, OperandType> BLA::operator&&(const MatrixBase<DerivedType, DerivedType::Rows, Cols, DType>&, const MatrixBase<OperandType, OperandType::Rows, Cols, DType>&) [with DerivedType = Matrix<3, 3>; OperandType = Matrix<3, 3>; int Cols = 3; DType = float]':
C:\Users\cflem\AppData\Local\Temp.arduinoIDE-unsaved202467-3320-15y8msi.qryx\HowToUse\HowToUse.ino:73:40: required from here
d:\Users\cflem\Documents\Arduino\libraries\BasicLinearAlgebra/impl/BasicLinearAlgebra.h:218:12: error: no matching function for call to 'BLA::VerticalConcat<BLA::Matrix<3, 3>, BLA::Matrix<3, 3> >::VerticalConcat(const BLA::Matrix<3, 3>&, const BLA::Matrix<3, 3>&)'
218 | return VerticalConcat<DerivedType, OperandType>(static_cast<const DerivedType &>(top),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
219 | static_cast<const OperandType &>(bottom));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
d:\Users\cflem\Documents\Arduino\libraries\BasicLinearAlgebra/ElementStorage.h:145:8: note: candidate: 'constexpr BLA::VerticalConcat<BLA::Matrix<3, 3>, BLA::Matrix<3, 3> >::VerticalConcat(const BLA::VerticalConcat<BLA::Matrix<3, 3>, BLA::Matrix<3, 3> >&)'
145 | struct VerticalConcat : public MatrixBase<VerticalConcat<TopType, BottomType>, TopType::Rows + BottomType::Rows,
| ^~~~~~~~~~~~~~
d:\Users\cflem\Documents\Arduino\libraries\BasicLinearAlgebra/ElementStorage.h:145:8: note: candidate expects 1 argument, 2 provided
d:\Users\cflem\Documents\Arduino\libraries\BasicLinearAlgebra/ElementStorage.h:145:8: note: candidate: 'constexpr BLA::VerticalConcat<BLA::Matrix<3, 3>, BLA::Matrix<3, 3> >::VerticalConcat(BLA::VerticalConcat<BLA::Matrix<3, 3>, BLA::Matrix<3, 3> >&&)'
d:\Users\cflem\Documents\Arduino\libraries\BasicLinearAlgebra/ElementStorage.h:145:8: note: candidate expects 1 argument, 2 provided

Unable to perform scalar operations

For some reason scalar multiplication is giving me error
When I add in the following line of code the code fails to compile

 k_process_noise = 10 * k_intermediate;

I get the following error

 no match for 'operator*' (operand types are 'int' and 'BLA::Matrix<1, 1>')
     k_process_noise = 10 * k_intermediate;
                       ~~~^~~~~~~~~~~~~~~~
In file included from Arduino/libraries/BasicLinearAlgebra/BasicLinearAlgebra.h:142:0,
               Arduino/libraries/BasicLinearAlgebra/impl/BasicLinearAlgebra.h:12:35: note: candidate: template<class MatAType, class MatBType, int MatARows, int MatACols, int MatBCols, class DType> BLA::Matrix<MatARows, MatBCols, DType> BLA::operator*(const BLA::MatrixBase<MatAType, MatARows, MatACols, DType>&, const BLA::MatrixBase<MatBType, MatACols, MatBCols, DType>&)
 Matrix<MatARows, MatBCols, DType> operator*(const MatrixBase<MatAType, MatARows, MatACols, DType> &matA,
                                   ^~~~~~~~
Arduino/libraries/BasicLinearAlgebra/impl/BasicLinearAlgebra.h:12:35: note:   template argument deduction/substitution failed:
/xiao_test/xiao_test.ino:68:28: note:   mismatched types 'const BLA::MatrixBase<MatAType, MatARows, MatACols, DType>' and 'int'
     k_process_noise = 10 * k_intermediate;
                            ^~~~~~~~~~~~~~
Arduino/libraries/BasicLinearAlgebra/BasicLinearAlgebra.h:142:0,
                xiao_test/xiao_test.ino:5:
Arduino/libraries/BasicLinearAlgebra/impl/BasicLinearAlgebra.h:158:27: note: candidate: template<class MatType, int Rows, int Cols, class DType> BLA::Matrix<Rows, Cols, DType> BLA::operator*(const BLA::MatrixBase<MatType, Rows, Cols, DType>&, DType)
 Matrix<Rows, Cols, DType> operator*(const MatrixBase<MatType, Rows, Cols, DType> &mat, const DType k)
                           ^~~~~~~~
Arduino/libraries/BasicLinearAlgebra/impl/BasicLinearAlgebra.h:158:27: note:   template argument deduction/substitution failed:
xiao_test/xiao_test.ino:68:28: note:   mismatched types 'const BLA::MatrixBase<MatType, Rows, Cols, DType>' and 'int'
     k_process_noise = 10 * k_intermediate;

Doesn't compile for ESP32 Dev Board

In file included from d:\Users\cflem\Documents\Arduino\libraries\BasicLinearAlgebra/BasicLinearAlgebra.h:10,
from C:\Users\cflem\AppData\Local\Temp.arduinoIDE-unsaved202467-3320-15y8msi.qryx\HowToUse\HowToUse.ino:1:
d:\Users\cflem\Documents\Arduino\libraries\BasicLinearAlgebra/ElementStorage.h:136:43: error: expected unqualified-id before 'const'
136 | HorizontalConcat<LeftType, RightType>(const LeftType &l, const RightType &r) : left(l), right(r) {}
| ^~~~~
d:\Users\cflem\Documents\Arduino\libraries\BasicLinearAlgebra/ElementStorage.h:136:43: error: expected ')' before 'const'
136 | HorizontalConcat<LeftType, RightType>(const LeftType &l, const RightType &r) : left(l), right(r) {}
| ~^~~~~
| )
d:\Users\cflem\Documents\Arduino\libraries\BasicLinearAlgebra/ElementStorage.h:151:41: error: expected unqualified-id before 'const'
151 | VerticalConcat<TopType, BottomType>(const TopType &t, const BottomType &b) : top(t), bottom(b) {}
| ^~~~~
d:\Users\cflem\Documents\Arduino\libraries\BasicLinearAlgebra/ElementStorage.h:151:41: error: expected ')' before 'const'
151 | VerticalConcat<TopType, BottomType>(const TopType &t, const BottomType &b) : top(t), bottom(b) {}
| ~^~~~~
| )
In file included from d:\Users\cflem\Documents\Arduino\libraries\BasicLinearAlgebra/BasicLinearAlgebra.h:181:
d:\Users\cflem\Documents\Arduino\libraries\BasicLinearAlgebra/impl/BasicLinearAlgebra.h: In instantiation of 'BLA::HorizontalConcat<DerivedType, OperandType> BLA::operator||(const MatrixBase<DerivedType, Rows, DerivedType::Cols, DType>&, const MatrixBase<OperandType, Rows, OperandType::Cols, DType>&) [with DerivedType = Matrix<3, 3>; OperandType = Matrix<3, 3>; int Rows = 3; DType = float]':
C:\Users\cflem\AppData\Local\Temp.arduinoIDE-unsaved202467-3320-15y8msi.qryx\HowToUse\HowToUse.ino:70:39: required from here
d:\Users\cflem\Documents\Arduino\libraries\BasicLinearAlgebra/impl/BasicLinearAlgebra.h:208:12: error: no matching function for call to 'BLA::HorizontalConcat<BLA::Matrix<3, 3>, BLA::Matrix<3, 3> >::HorizontalConcat(const BLA::Matrix<3, 3>&, const BLA::Matrix<3, 3>&)'
208 | return HorizontalConcat<DerivedType, OperandType>(static_cast<const DerivedType &>(left),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
209 | static_cast<const OperandType &>(right));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
d:\Users\cflem\Documents\Arduino\libraries\BasicLinearAlgebra/ElementStorage.h:130:8: note: candidate: 'constexpr BLA::HorizontalConcat<BLA::Matrix<3, 3>, BLA::Matrix<3, 3> >::HorizontalConcat(const BLA::HorizontalConcat<BLA::Matrix<3, 3>, BLA::Matrix<3, 3> >&)'
130 | struct HorizontalConcat : public MatrixBase<HorizontalConcat<LeftType, RightType>, LeftType::Rows,
| ^~~~~~~~~~~~~~~~
d:\Users\cflem\Documents\Arduino\libraries\BasicLinearAlgebra/ElementStorage.h:130:8: note: candidate expects 1 argument, 2 provided
d:\Users\cflem\Documents\Arduino\libraries\BasicLinearAlgebra/ElementStorage.h:130:8: note: candidate: 'constexpr BLA::HorizontalConcat<BLA::Matrix<3, 3>, BLA::Matrix<3, 3> >::HorizontalConcat(BLA::HorizontalConcat<BLA::Matrix<3, 3>, BLA::Matrix<3, 3> >&&)'
d:\Users\cflem\Documents\Arduino\libraries\BasicLinearAlgebra/ElementStorage.h:130:8: note: candidate expects 1 argument, 2 provided
d:\Users\cflem\Documents\Arduino\libraries\BasicLinearAlgebra/impl/BasicLinearAlgebra.h: In instantiation of 'BLA::VerticalConcat<DerivedType, OperandType> BLA::operator&&(const MatrixBase<DerivedType, DerivedType::Rows, Cols, DType>&, const MatrixBase<OperandType, OperandType::Rows, Cols, DType>&) [with DerivedType = Matrix<3, 3>; OperandType = Matrix<3, 3>; int Cols = 3; DType = float]':
C:\Users\cflem\AppData\Local\Temp.arduinoIDE-unsaved202467-3320-15y8msi.qryx\HowToUse\HowToUse.ino:73:40: required from here
d:\Users\cflem\Documents\Arduino\libraries\BasicLinearAlgebra/impl/BasicLinearAlgebra.h:218:12: error: no matching function for call to 'BLA::VerticalConcat<BLA::Matrix<3, 3>, BLA::Matrix<3, 3> >::VerticalConcat(const BLA::Matrix<3, 3>&, const BLA::Matrix<3, 3>&)'
218 | return VerticalConcat<DerivedType, OperandType>(static_cast<const DerivedType &>(top),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
219 | static_cast<const OperandType &>(bottom));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
d:\Users\cflem\Documents\Arduino\libraries\BasicLinearAlgebra/ElementStorage.h:145:8: note: candidate: 'constexpr BLA::VerticalConcat<BLA::Matrix<3, 3>, BLA::Matrix<3, 3> >::VerticalConcat(const BLA::VerticalConcat<BLA::Matrix<3, 3>, BLA::Matrix<3, 3> >&)'
145 | struct VerticalConcat : public MatrixBase<VerticalConcat<TopType, BottomType>, TopType::Rows + BottomType::Rows,
| ^~~~~~~~~~~~~~
d:\Users\cflem\Documents\Arduino\libraries\BasicLinearAlgebra/ElementStorage.h:145:8: note: candidate expects 1 argument, 2 provided
d:\Users\cflem\Documents\Arduino\libraries\BasicLinearAlgebra/ElementStorage.h:145:8: note: candidate: 'constexpr BLA::VerticalConcat<BLA::Matrix<3, 3>, BLA::Matrix<3, 3> >::VerticalConcat(BLA::VerticalConcat<BLA::Matrix<3, 3>, BLA::Matrix<3, 3> >&&)'
d:\Users\cflem\Documents\Arduino\libraries\BasicLinearAlgebra/ElementStorage.h:145:8: note: candidate expects 1 argument, 2 provided

Error using CMake -- multiple definitions of "Serial"

When trying to make a c++ class that utilizes BLA, I encounter an error when testing on Linux and Mac. After running cmake .. and make from directory Test_BLA/build/, I receive the error:

Scanning dependencies of target TEST
[ 25%] Building CXX object CMakeFiles/TEST.dir/Test.cpp.o
[ 50%] Linking CXX static library libTEST.a
[ 50%] Built target TEST
Scanning dependencies of target my_test
[ 75%] Building CXX object CMakeFiles/my_test.dir/main.cpp.o
[100%] Linking CXX executable my_test
/usr/bin/ld: libTEST.a(Test.cpp.o):(.bss+0x0): multiple definition of `Serial'; CMakeFiles/my_test.dir/main.cpp.o:(.bss+0x0): first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/my_test.dir/build.make:85: my_test] Error 1
make[1]: *** [CMakeFiles/Makefile2:78: CMakeFiles/my_test.dir/all] Error 2
make: *** [Makefile:84: all] Error 2

Here is my directory structure:
|โ”œโ”€โ”€ BasicLinearAlgebra/
|โ””โ”€โ”€ Test_BLA/
| . . . โ”œโ”€โ”€ Arduino.h
| . . . โ”œโ”€โ”€ build/
| . . . โ”œโ”€โ”€ CMakeLists.txt
| . . . โ”œโ”€โ”€ main.cpp
| . . . โ”œโ”€โ”€ Test.cpp
| . . . โ””โ”€โ”€ Test.h

The contents of Arduino.h are the same as https://github.com/tomstewart89/BasicLinearAlgebra/blob/master/test/Arduino.h.

Contents of CMakeLists.txt:

cmake_minimum_required(VERSION 3.2)

project(my_test_proj)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -O3")

# Test lib
add_library(TEST Test.cpp)

# Arduino BasicLinearAlgebra
add_library(BLA INTERFACE)
target_include_directories(BLA INTERFACE ${CMAKE_SOURCE_DIR}/../BasicLinearAlgebra)

# Executable
add_executable(my_test main.cpp)
include_directories(
    ${CMAKE_SOURCE_DIR}/../BasicLinearAlgebra
    ${PROJECT_SOURCE_DIR}
)
target_link_libraries(my_test
    BLA
    TEST
)

Contents of main.cpp:

#include "Test.h"
#include <BasicLinearAlgebra.h>

int main(){
    Test test;
}

Contents of Test.h:

#pragma once

#include <BasicLinearAlgebra.h>

class Test
{
public:
  Test();
};

Contents of Test.cpp:

#include "Test.h"

Test::Test()
{
}

Note that if I change the instance name of the Print struct within Arduino.h to be Serial_test instead of Serial, then the error message changes to multiple definition of `Serial_test'. Thanks for any help and this great library!

Eye() behaves like Ones() when doing math

Hi,

I noticed that in some cases a matrix instantiated by using Eye() sometimes behaves like it was instantiated by Ones(). It seems if you access it via indexing, ie I(0,0), it behaves like the identity, but if you use it to do math, it behaves like ones.

  auto I = BLA::Eye<2,2>(); 
  auto Z = BLA::Zeros<2,2>();
  auto R = I+Z;
  
  Serial.printf("%.3f, %.3f, %.3f, %.3f\n", I(0,0),I(1,0),I(0,1),I(1,1) );
  Serial.printf("%.3f, %.3f, %.3f, %.3f\n", R(0,0),R(1,0),R(0,1),R(1,1) );

returns

1.000, 0.000, 0.000, 1.000
1.000, 1.000, 1.000, 1.000

Using a debug probe I've confirmed that the memory of I is full of 1's.

Is this a bug, or am I using the result of Eye() inappropriately?

Missing 2-Norm operator

Hi Tom,

I want to compute the 2-norm operator of a vector.
float n;
BLA::Matrix<4,1> x = {1,2,3,4};
n = x.norm(); // n = 5.4772

Is it currently implemented?

Thank you for your time!

Att,
Juan

Code-breaking updates in 4.0.0

Hi there, my Arduino code compiles and runs, working as expected, using v3.7.0 of BLA, but updating to v4.0.0 breaks it. Here is a truncated example of my code that compiles fine on v3.7.0 but fails on v4.0.0

#include <BasicLinearAlgebra.h>
using namespace BLA;

Matrix<2, 2> A = {0, 1, 0, -17.13};
Matrix<2, 1> B = {0, 2.46};
Matrix<1, 2> C = {1, 0};
Matrix<1, 2> K = {136.8767, 0.7485};
Matrix<2, 1> L = {62.87, 523.0369};

Matrix<2, 1> z_hat;
Matrix<2, 1> z_hat_dot;
Matrix<1, 1> u = {0};

void setup(){
  z_hat.Fill(0);
}

void loop(){
  //double y = encoderPos*K_encoder-x_sg;
  double y = 1.0;
  z_hat_dot = (A * z_hat) + (B * u) - (L * (C * z_hat - y));
  u = -K * z_hat;
}

The following I would expect to work as negation:

  candidate expects 2 arguments, 1 provided
   u = -K * z_hat;
        ^
exit status 1
no match for 'operator-' (operand types are 'BLA::Matrix<1, 1>' and 'double')

[EDIT] The following error makes sense as this would cast y down to a lower resolution. Strange however that it throws an error in 4.0.0 and not in 3.7.0
And the following, which I can "fix" by changing the declaration of y to be a float:

note:   deduced conflicting types for parameter 'DType' ('float' and 'double')
   z_hat_dot = (A * z_hat) + (B * u) - (L * (C * z_hat - y));

No license specified

I noticed that there is no license specified, which to my knowledge means that it actually isn't open source currently, nor am I allowed to redistribute code using this library. It would be very useful if you could specify the license, I assume it is just a mistake that it is missing.

https://choosealicense.com/no-permission/ might be a useful resource for you in case you are not well versed in why this is a problem. That site also provides some advice for finding a suitable license.

Integer Matrices gives wrong answers

Doing this on an esp32-S3-devkit but

Determinants with integer Matrix gives wrong result

#include <BasicLinearAlgebra.h>
using namespace BLA;

void setup() {
  // Beginning the Serial Port
  Serial.begin(115200);
  // Defining the matrix
  BLA::Matrix<3,3,int> A = {9, 8, 7, 6, 5, 4, 3, 2, 1};

  Serial << "A: " << A << '\n';

  int b = BLA::Determinant(A);

  Serial << "|A|: " << b << '\n';
}

void loop() {
}

Gives 96 as the output, not zero

#include <BasicLinearAlgebra.h>
using namespace BLA;

void setup() {
  // Beginning the Serial Port
  Serial.begin(115200);
  // Defining the matrix
  BLA::Matrix<3,3> A = {9.0, 8.0, 7.0, 6.0, 5.0, 4.0, 3.0, 2.0, 1.0};
  Serial << "A: " << A << '\n';

  int b = BLA::Determinant(A);

  Serial << "|A|: " << b << '\n';
}

void loop() {
}

This gives the right result of 0

Suggestion: Assignment 1-d array

Assignment of 1-d array as Matrix<3> M = float array[3] would be be usefull. It only works if i use Matrix<3> = float[3][1], and thus the float array has to be converted.
Maybe there's some another handy way to assign the array?

Multiplying a Matrix times a scalar

Motivation: In an effort to do x_hat_new = A*x_hat + B*u

The A*x is easy since both are matrices.

I'd like to do something like:

Matrix<3,1> B, foo;
B << 1,2,3;
float u;
u = 0.5;
foo = B * u;
// or even:
ScalarMultiply(B, u, foo);
// where foo is now {{0.5},{1},{1.5}}

I suspect this is not possible given BLA's current state. If its possible let me know, otherwise I'd be happy to write a PR.

What data type to return in function?

Hello,

I'm writing a class with Matrix class as constructor parameters.
Some of functions of this class also return Matrix.
I tried Matrix<int, int> and Matrix<int, int, class, class> as data type to return in my function but both of them didn't work.

Here's the error message:
error: type/value mismatch at argument 1 in template parameter list for 'template<int rows, int cols, class ElemT, class MemT> class Matrix' Matrix<int, int, class, class> _R;

template instantiation depth exceeds maximum of 900

The error is

 required from here
.pio/libdeps/esp32_s3_8_8/BasicLinearAlgebra/ElementStorage.h:33:9: fatal error: template instantiation depth exceeds maximum of 900 (use -ftemplate-depth= to increase the maximum)
         FillRowMajor(++start_idx, tail...);
         ^~~~~~~~~~~~
compilation terminated.

I'm trying to use a 32x64 matrix like this:

BLA::Matrix<64, 32> mlp10weight = {
      0.05446106567978859,     0.04698100686073303,    0.10509192943572998,
      0.002267003059387207,    0.3
.................. }

according to the error, I added a flag to the compiler:
-ftemplate-depth=2100, but the indexing process is taking forever, it's just stuck here. Could you please enlighten me on how to resolve this?

problem on Invert matrix<1, 1>

Here is the example.

BLA::Matrix<1, 3> H; 
BLA::Matrix<3, 3> P; 
auto C = BLA::Invert(H*P*(~H));

And error occurs
no instance of overloaded function "BLA::Invert" matches the argument list
argument types are: (BLA::Matrix<1, 1, float>)

It will be nice to implement this trivial situation.

examples don't compile

When i try to compile the example 'HowToUse.ino' using the arduino ide i get a whole bunch of errors.

In file included from /home/zac/sketchbook/libraries/basiclinearalgebra/BasicLinearAlgebra.h:9:0,
from HowToUse.ino:1:
/home/zac/sketchbook/libraries/basiclinearalgebra/MemoryDelegate.hpp:64:55: error: expected unqualified-id before โ€˜usingโ€™
template<int rows, int cols = 1, class ElemT = float> using ArrayMatrix = Matrix<rows,cols,Array<rows,cols,ElemT> >;
^
/home/zac/sketchbook/libraries/basiclinearalgebra/MemoryDelegate.hpp:84:51: error: expected unqualified-id before โ€˜usingโ€™
template<int rows, int cols, class ElemT = float> using ArrayRef = Reference<Array<rows,cols,ElemT> >;
^
/home/zac/sketchbook/libraries/basiclinearalgebra/MemoryDelegate.hpp:85:49: error: expected unqualified-id before โ€˜usingโ€™
template<int rows, int cols, class ParentMemT > using RefMatrix = Matrix<rows,cols,Reference >;
^
/home/zac/sketchbook/libraries/basiclinearalgebra/MemoryDelegate.hpp:105:58: error: expected unqualified-id before โ€˜usingโ€™
template<int rows, int cols = rows, class ElemT = float> using Identity = Matrix<rows,cols,Iden >;
^
/home/zac/sketchbook/libraries/basiclinearalgebra/MemoryDelegate.hpp:121:55: error: expected unqualified-id before โ€˜usingโ€™
template<int rows, int cols = 1, class ElemT = float> using Zeros = Matrix<rows,cols,Zero >;
^
/home/zac/sketchbook/libraries/basiclinearalgebra/MemoryDelegate.hpp:183:73: error: expected unqualified-id before โ€˜usingโ€™
template<int rows, int cols, int tableSize = cols, class ElemT = float> using SparseMatrix = Matrix<rows,cols,Sparse<cols,tableSize,ElemT> >;
^
In file included from HowToUse.ino:1:0:
/home/zac/sketchbook/libraries/basiclinearalgebra/BasicLinearAlgebra.h: In member function โ€˜void BLA::Matrix<rows, cols, MemT>::FillRowMajor(typename MemT::elem_t, TAIL ...)โ€™:
/home/zac/sketchbook/libraries/basiclinearalgebra/BasicLinearAlgebra.h:206:91: error: there are no arguments to โ€˜static_assertโ€™ that depend on a template parameter, so a declaration of โ€˜static_assertโ€™ must be available [-fpermissive]
static_assert(rowscols > sizeof...(TAIL), "Too many arguments passed to FillRowMajor");
^
/home/zac/sketchbook/libraries/basiclinearalgebra/BasicLinearAlgebra.h:206:91: note: (if you use โ€˜-fpermissiveโ€™, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
HowToUse.ino: In function โ€˜void setup()โ€™:
HowToUse.ino:42:36: error: in C++98 โ€˜Bโ€™ must be initialised by constructor, not by โ€˜{...}โ€™
HowToUse.ino:86:8: error: โ€˜refAonTopOfBโ€™ does not name a type
In file included from HowToUse.ino:1:0:
/home/zac/sketchbook/libraries/basiclinearalgebra/BasicLinearAlgebra.h: In instantiation of โ€˜void BLA::Matrix<rows, cols, MemT>::FillRowMajor(typename MemT::elem_t, TAIL ...) [with TAIL = {double, double, double, double, double, double, double, double}; int rows = 3; int cols = 3; MemT = BLA::Array<3, 3, float>; typename MemT::elem_t = float]โ€™:
/home/zac/sketchbook/libraries/basiclinearalgebra/BasicLinearAlgebra.h:58:67: required from โ€˜BLA::Matrix<rows, cols, MemT>::Matrix(ARGS ...) [with ARGS = {double, double, double, double, double, double, double, double, double}; int rows = 3; int cols = 3; MemT = BLA::Array<3, 3, float>]โ€™
HowToUse.ino:42:36: required from here
/home/zac/sketchbook/libraries/basiclinearalgebra/BasicLinearAlgebra.h:206:18: error: โ€˜static_assertโ€™ was not declared in this scope
static_assert(rows
cols > sizeof...(TAIL), "Too many arguments passed to FillRowMajor");
^

Implementing a "ones" matrix

Implementing a matrix with all elements equal to 1. $\vec 1$ would be a "diagonal" matrix that can be scaled, created using Ones<rows,columns> similar to Zeros.

Sparse matrix

Hi, the code on read.me do not compile.
Matrix<2000,3000, float, Sparse<3000,100,float> > sparseMatrix;

I changed to

Matrix<2000,3000, Sparse<3000,100,float> > sparseMatrix;

Ten i van compile but i cant assign aby value to sparse Matrix?
Can you give me an example of use sparse matrix? A example on how IT works would be great. Thanx

issue with matrix inversion

Line 55 of NotSoBasicLinearAlgebra.h
Go to file

        for (int j = 0; j <= dim; ++j)

the <= is wrong, it should be <

Also I'm not sure why you say the matrix is singular only of all the elements are null.
You would need to check the determinant to see if the matrix is singular.

code to demonstrate the issue:

#include <BasicLinearAlgebra.h>
using namespace BLA;

void printMatrix(Matrix<4, 4, Array<4, 4, int>>& m) {
  for (size_t i = 0; i < m.Rows; i++) {
    for (size_t j = 0; j < m.Cols; j++) {
      Serial.print(m(i, j));
      Serial.write('\t');
    }
    Serial.println();
  }
  Serial.println();
}

void setup() {
  Serial.begin(115200); Serial.println();

  Matrix<4, 4, Array<4, 4, int>> baseMatrix;
  Matrix<4, 4, Array<4, 4, int>> inverseMatrix;
  Matrix<4, 4, Array<4, 4, int>> verif;

  baseMatrix = {1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1};

  Serial.println("attempting to inverse");
  printMatrix(baseMatrix);

  int d  = Determinant(baseMatrix);
  Serial.print("Determinant = ");  Serial.println(d);

  if (Invert(baseMatrix, inverseMatrix)) {
    Serial.println("Matrix could be inveresed");
    printMatrix(inverseMatrix);

    verif = baseMatrix * inverseMatrix;
    Serial.println("Multiplying the matrix gives");
    printMatrix(inverseMatrix);
  } else {
    Serial.println("Matrix could not be inveresed");
  }
}

void loop() {}

Matrix without a specific row/column size

Hi @tomstewart89,

Is it not possible to pass a matrix as parameter of a function without specifying the number of rows and columns?

I would like to have a function something like this: void function (BLA::Matrix P), and inside the function I would use GetColCount() and GetRowCount() to handle matrixes of any size.

Thanks!

Tabbed Function is not Working With the BLA

I am trying to use a tabbed function to produce a matrix; however, it says it "was not declared in this scope" when I call it from the main loop. The function in question is HomogenousTransform and is being called in line 96. I feel like there is something small that is preventing this from working properly so I look forward to hearing your ideas.

What is odd is that the function runs when I define it after the setup (lines 59-68)

You can find my code here, let me know if you find the same issue https://github.com/grndctrl2majtom/ArduinoMatrixTrial

Something weird is happening when I want to display the Matrix data

Hi Tom,

I want to send data via serial communication, as you can see in the picture. If I write a random float numbers instead "PV(1,1)" and "PV(2,1)" the numbers are displayed in Simulink without problem. So, sending data it's not the problem.

I was testing how to send matrix values created with your library. The strange thing happened when I wanted to send "PV(1,1)" and "PV(2,1)", It was declared like this "BLA::Matrix<2,1> PV;" then in the loop, I filled the matrix "PV" as shown in the picture. The code compiled without errors so , when I went To simulink, It displayed the values of "SEPO"... I tested with "Monitor Serie" in Arduino and the same problem.

I also tested sending "SEPO" values and Simulink displayed "nan, nan"

Finally I created a new matrix "e" and I assigned values after "PV" as shown in the second picture. Simulink displayed now "PV" values...

IDK what's wrong, its my first time using your powerfull library, but I don't know if I skipped a step or what happen :(

Kind regards from Colombia :D

GitHub
GitHub2

Matrix Multiplication with different sized matrices gives errors

When I try to multiply matrices of different sizes (while ensuring the dimensions are compatible), the compiler says there are dimension issues. The following code will consistently give me the error when attempting to do C = A*B:
#include <BasicLinearAlgebra.h>

using namespace BLA;

void setup() {
Matrix<2,2> A;
A.Fill(1);

Matrix<2,1> B;
B.Fill(2);

Matrix<2,1> C = A * B;
}

void loop() {}`

works in 3.7 broken in 4.0/4.1

Hi,
really thanks for your work and time on this great Library!

Im working on an ESP32 codebase. Even if there is hardly nothing to compile in main (its the PIO init template, see below), this compiler error happens since 4.0.
in 3.7 the compiler went thru. I use VS code with the platform IO plugin.

compiled test code:

#include <Arduino.h>
#include <BasicLinearAlgebra.h>
using namespace BLA;

// put function declarations here:
int myFunction(int, int);

void setup() {
  // put your setup code here, to run once:
  int result = myFunction(2, 3);
}

void loop() {
  // put your main code here, to run repeatedly:
}

// put function definitions here:
int myFunction(int x, int y) {
  return x + y;
}

compiler error in 4.0/4.1:

Compiling .pio/build/featheresp32/FrameworkArduino/WMath.cpp.o
Compiling .pio/build/featheresp32/FrameworkArduino/WString.cpp.o
Compiling .pio/build/featheresp32/FrameworkArduino/base64.cpp.o
Compiling .pio/build/featheresp32/FrameworkArduino/cbuf.cpp.o
In file included from .pio/libdeps/featheresp32/BasicLinearAlgebra/BasicLinearAlgebra.h:158:0,
                 from src/main.cpp:2:
.pio/libdeps/featheresp32/BasicLinearAlgebra/impl/NotSoBasicLinearAlgebra.h: In constructor 'BLA::LUDecomposition<ParentType>::LUDecomposition(BLA::MatrixBase<DerivedType, DerivedType:: Rows, DerivedType:: Cols, typename DerivedType::DType>&)':
.pio/libdeps/featheresp32/BasicLinearAlgebra/impl/NotSoBasicLinearAlgebra.h:25:59: error: expected ',' before ')' token
         static_assert(ParentType::Rows == ParentType::Cols);
                                                           ^
.pio/libdeps/featheresp32/BasicLinearAlgebra/impl/NotSoBasicLinearAlgebra.h:25:59: error: expected string-literal before ')' token

Compiling .pio/build/featheresp32/FrameworkArduino/esp32-hal-adc.c.o
Compiling .pio/build/featheresp32/FrameworkArduino/esp32-hal-bt.c.o
*** [.pio/build/featheresp32/src/main.cpp.o] Error 1

Custom matrix diagonal values

Hi Scott, I'm loving this library.
I was wondering would it be possible to somehow make a storage efficient matrix with values in multiple diagonals?
The particular matrix would be like the one in the image.
image
Obviously adding all those zero's would be a waste, thanks in advance for your response!

Transpose function

Dear Tom,

I do not find the transpose function.
Can you include it in the library?

Thanks,

Juan

BLA not compiling for esp32 core boards.

First of all, I love this library and am very excited to work with the geometry library as well. Here's the sketch I'm trying to compile:

#include <BasicLinearAlgebra.h>
#include <ElementStorage.h>


void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}

This compiles with no issues for all the AVR boards i've tested but does not compile with the esp32 boards.
This is a fresh zip file install of arduino that only has esp32 core, the BLA library, and the geometry library. Error message is as follows:






















C:\Users\Aaron\Documents\arduino-1.8.16\arduino-builder -dump-prefs -logger=machine -hardware C:\Users\Aaron\Documents\arduino-1.8.16\hardware -hardware C:\Users\Aaron\AppData\Local\Arduino15\packages -tools C:\Users\Aaron\Documents\arduino-1.8.16\tools-builder -tools C:\Users\Aaron\Documents\arduino-1.8.16\hardware\tools\avr -tools C:\Users\Aaron\AppData\Local\Arduino15\packages -built-in-libraries C:\Users\Aaron\Documents\arduino-1.8.16\libraries -libraries C:\Users\Aaron\Documents\Arduino\libraries -fqbn=esp32:esp32:esp32thing:FlashFreq=80,PartitionScheme=default,UploadSpeed=921600,DebugLevel=none -ide-version=10816 -build-path C:\Users\Aaron\AppData\Local\Temp\arduino_build_665410 -warnings=none -build-cache C:\Users\Aaron\AppData\Local\Temp\arduino_cache_379338 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.mkspiffs.path=C:\Users\Aaron\AppData\Local\Arduino15\packages\esp32\tools\mkspiffs\0.2.3 -prefs=runtime.tools.mkspiffs-0.2.3.path=C:\Users\Aaron\AppData\Local\Arduino15\packages\esp32\tools\mkspiffs\0.2.3 -prefs=runtime.tools.esptool_py.path=C:\Users\Aaron\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\3.0.0 -prefs=runtime.tools.esptool_py-3.0.0.path=C:\Users\Aaron\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\3.0.0 -prefs=runtime.tools.xtensa-esp32-elf-gcc.path=C:\Users\Aaron\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-97-gc752ad5-5.2.0 -prefs=runtime.tools.xtensa-esp32-elf-gcc-1.22.0-97-gc752ad5-5.2.0.path=C:\Users\Aaron\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-97-gc752ad5-5.2.0 -verbose C:\Users\Aaron\Documents\Arduino\test\test.ino

C:\Users\Aaron\Documents\arduino-1.8.16\arduino-builder -compile -logger=machine -hardware C:\Users\Aaron\Documents\arduino-1.8.16\hardware -hardware C:\Users\Aaron\AppData\Local\Arduino15\packages -tools C:\Users\Aaron\Documents\arduino-1.8.16\tools-builder -tools C:\Users\Aaron\Documents\arduino-1.8.16\hardware\tools\avr -tools C:\Users\Aaron\AppData\Local\Arduino15\packages -built-in-libraries C:\Users\Aaron\Documents\arduino-1.8.16\libraries -libraries C:\Users\Aaron\Documents\Arduino\libraries -fqbn=esp32:esp32:esp32thing:FlashFreq=80,PartitionScheme=default,UploadSpeed=921600,DebugLevel=none -ide-version=10816 -build-path C:\Users\Aaron\AppData\Local\Temp\arduino_build_665410 -warnings=none -build-cache C:\Users\Aaron\AppData\Local\Temp\arduino_cache_379338 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.mkspiffs.path=C:\Users\Aaron\AppData\Local\Arduino15\packages\esp32\tools\mkspiffs\0.2.3 -prefs=runtime.tools.mkspiffs-0.2.3.path=C:\Users\Aaron\AppData\Local\Arduino15\packages\esp32\tools\mkspiffs\0.2.3 -prefs=runtime.tools.esptool_py.path=C:\Users\Aaron\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\3.0.0 -prefs=runtime.tools.esptool_py-3.0.0.path=C:\Users\Aaron\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\3.0.0 -prefs=runtime.tools.xtensa-esp32-elf-gcc.path=C:\Users\Aaron\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-97-gc752ad5-5.2.0 -prefs=runtime.tools.xtensa-esp32-elf-gcc-1.22.0-97-gc752ad5-5.2.0.path=C:\Users\Aaron\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-97-gc752ad5-5.2.0 -verbose C:\Users\Aaron\Documents\Arduino\test\test.ino

Using board 'esp32thing' from platform in folder: C:\Users\Aaron\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6

Using core 'esp32' from platform in folder: C:\Users\Aaron\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6

cmd /c if exist "C:\\Users\\Aaron\\Documents\\Arduino\\test\\partitions.csv" copy /y "C:\\Users\\Aaron\\Documents\\Arduino\\test\\partitions.csv" "C:\\Users\\Aaron\\AppData\\Local\\Temp\\arduino_build_665410\\partitions.csv"

cmd /c if not exist "C:\\Users\\Aaron\\AppData\\Local\\Temp\\arduino_build_665410\\partitions.csv" copy "C:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\tools\\partitions\\default.csv" "C:\\Users\\Aaron\\AppData\\Local\\Temp\\arduino_build_665410\\partitions.csv"

        1 file(s) copied.

Detecting libraries used...

"C:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\xtensa-esp32-elf-gcc\\1.22.0-97-gc752ad5-5.2.0/bin/xtensa-esp32-elf-g++" -DESP_PLATFORM "-DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\"" -DHAVE_CONFIG_H -DGCC_NOT_5_2_0=0 -DWITH_POSIX "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/config" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/app_trace" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/app_update" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/asio" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/bootloader_support" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/bt" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/coap" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/console" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/driver" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/efuse" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp-tls" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp32" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_adc_cal" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_event" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_http_client" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_http_server" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_https_ota" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_https_server" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_ringbuf" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_websocket_client" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/espcoredump" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/ethernet" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/expat" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/fatfs" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/freemodbus" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/freertos" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/heap" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/idf_test" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/jsmn" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/json" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/libsodium" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/log" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/lwip" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/mbedtls" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/mdns" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/micro-ecc" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/mqtt" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/newlib" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/nghttp" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/nvs_flash" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/openssl" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/protobuf-c" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/protocomm" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/pthread" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/sdmmc" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/smartconfig_ack" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/soc" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/spi_flash" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/spiffs" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/tcp_transport" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/tcpip_adapter" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/ulp" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/unity" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/vfs" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/wear_levelling" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/wifi_provisioning" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/wpa_supplicant" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/xtensa-debug-module" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp-face" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp32-camera" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp-face" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/fb_gfx" -std=gnu++11 -Os -g3 -Wpointer-arith -fexceptions -fstack-protector -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -w -Wno-error=maybe-uninitialized -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-unused-but-set-parameter -Wno-missing-field-initializers -Wno-sign-compare -fno-rtti -c -w -x c++ -E -CC -DF_CPU=240000000L -DARDUINO=10816 -DARDUINO_ESP32_THING -DARDUINO_ARCH_ESP32 "-DARDUINO_BOARD=\"ESP32_THING\"" "-DARDUINO_VARIANT=\"esp32thing\"" -DESP32 -DCORE_DEBUG_LEVEL=0 "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\cores\\esp32" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\variants\\esp32thing" "C:\\Users\\Aaron\\AppData\\Local\\Temp\\arduino_build_665410\\sketch\\test.ino.cpp" -o nul

Alternatives for BasicLinearAlgebra.h: [[email protected]]

ResolveLibrary(BasicLinearAlgebra.h)

  -> candidates: [[email protected]]

"C:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\xtensa-esp32-elf-gcc\\1.22.0-97-gc752ad5-5.2.0/bin/xtensa-esp32-elf-g++" -DESP_PLATFORM "-DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\"" -DHAVE_CONFIG_H -DGCC_NOT_5_2_0=0 -DWITH_POSIX "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/config" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/app_trace" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/app_update" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/asio" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/bootloader_support" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/bt" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/coap" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/console" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/driver" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/efuse" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp-tls" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp32" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_adc_cal" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_event" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_http_client" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_http_server" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_https_ota" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_https_server" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_ringbuf" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_websocket_client" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/espcoredump" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/ethernet" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/expat" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/fatfs" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/freemodbus" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/freertos" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/heap" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/idf_test" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/jsmn" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/json" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/libsodium" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/log" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/lwip" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/mbedtls" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/mdns" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/micro-ecc" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/mqtt" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/newlib" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/nghttp" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/nvs_flash" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/openssl" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/protobuf-c" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/protocomm" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/pthread" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/sdmmc" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/smartconfig_ack" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/soc" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/spi_flash" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/spiffs" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/tcp_transport" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/tcpip_adapter" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/ulp" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/unity" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/vfs" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/wear_levelling" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/wifi_provisioning" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/wpa_supplicant" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/xtensa-debug-module" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp-face" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp32-camera" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp-face" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/fb_gfx" -std=gnu++11 -Os -g3 -Wpointer-arith -fexceptions -fstack-protector -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -w -Wno-error=maybe-uninitialized -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-unused-but-set-parameter -Wno-missing-field-initializers -Wno-sign-compare -fno-rtti -c -w -x c++ -E -CC -DF_CPU=240000000L -DARDUINO=10816 -DARDUINO_ESP32_THING -DARDUINO_ARCH_ESP32 "-DARDUINO_BOARD=\"ESP32_THING\"" "-DARDUINO_VARIANT=\"esp32thing\"" -DESP32 -DCORE_DEBUG_LEVEL=0 "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\cores\\esp32" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\variants\\esp32thing" "-IC:\\Users\\Aaron\\Documents\\Arduino\\libraries\\BasicLinearAlgebra" "C:\\Users\\Aaron\\AppData\\Local\\Temp\\arduino_build_665410\\sketch\\test.ino.cpp" -o nul

Generating function prototypes...

"C:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\xtensa-esp32-elf-gcc\\1.22.0-97-gc752ad5-5.2.0/bin/xtensa-esp32-elf-g++" -DESP_PLATFORM "-DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\"" -DHAVE_CONFIG_H -DGCC_NOT_5_2_0=0 -DWITH_POSIX "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/config" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/app_trace" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/app_update" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/asio" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/bootloader_support" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/bt" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/coap" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/console" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/driver" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/efuse" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp-tls" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp32" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_adc_cal" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_event" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_http_client" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_http_server" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_https_ota" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_https_server" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_ringbuf" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_websocket_client" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/espcoredump" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/ethernet" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/expat" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/fatfs" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/freemodbus" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/freertos" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/heap" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/idf_test" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/jsmn" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/json" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/libsodium" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/log" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/lwip" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/mbedtls" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/mdns" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/micro-ecc" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/mqtt" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/newlib" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/nghttp" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/nvs_flash" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/openssl" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/protobuf-c" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/protocomm" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/pthread" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/sdmmc" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/smartconfig_ack" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/soc" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/spi_flash" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/spiffs" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/tcp_transport" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/tcpip_adapter" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/ulp" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/unity" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/vfs" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/wear_levelling" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/wifi_provisioning" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/wpa_supplicant" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/xtensa-debug-module" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp-face" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp32-camera" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp-face" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/fb_gfx" -std=gnu++11 -Os -g3 -Wpointer-arith -fexceptions -fstack-protector -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -w -Wno-error=maybe-uninitialized -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-unused-but-set-parameter -Wno-missing-field-initializers -Wno-sign-compare -fno-rtti -c -w -x c++ -E -CC -DF_CPU=240000000L -DARDUINO=10816 -DARDUINO_ESP32_THING -DARDUINO_ARCH_ESP32 "-DARDUINO_BOARD=\"ESP32_THING\"" "-DARDUINO_VARIANT=\"esp32thing\"" -DESP32 -DCORE_DEBUG_LEVEL=0 "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\cores\\esp32" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\variants\\esp32thing" "-IC:\\Users\\Aaron\\Documents\\Arduino\\libraries\\BasicLinearAlgebra" "C:\\Users\\Aaron\\AppData\\Local\\Temp\\arduino_build_665410\\sketch\\test.ino.cpp" -o "C:\\Users\\Aaron\\AppData\\Local\\Temp\\arduino_build_665410\\preproc\\ctags_target_for_gcc_minus_e.cpp"

"C:\\Users\\Aaron\\Documents\\arduino-1.8.16\\tools-builder\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\Aaron\\AppData\\Local\\Temp\\arduino_build_665410\\preproc\\ctags_target_for_gcc_minus_e.cpp"

Compiling sketch...

"C:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\xtensa-esp32-elf-gcc\\1.22.0-97-gc752ad5-5.2.0/bin/xtensa-esp32-elf-g++" -DESP_PLATFORM "-DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\"" -DHAVE_CONFIG_H -DGCC_NOT_5_2_0=0 -DWITH_POSIX "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/config" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/app_trace" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/app_update" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/asio" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/bootloader_support" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/bt" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/coap" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/console" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/driver" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/efuse" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp-tls" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp32" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_adc_cal" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_event" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_http_client" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_http_server" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_https_ota" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_https_server" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_ringbuf" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp_websocket_client" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/espcoredump" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/ethernet" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/expat" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/fatfs" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/freemodbus" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/freertos" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/heap" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/idf_test" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/jsmn" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/json" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/libsodium" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/log" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/lwip" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/mbedtls" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/mdns" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/micro-ecc" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/mqtt" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/newlib" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/nghttp" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/nvs_flash" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/openssl" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/protobuf-c" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/protocomm" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/pthread" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/sdmmc" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/smartconfig_ack" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/soc" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/spi_flash" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/spiffs" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/tcp_transport" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/tcpip_adapter" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/ulp" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/unity" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/vfs" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/wear_levelling" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/wifi_provisioning" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/wpa_supplicant" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/xtensa-debug-module" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp-face" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp32-camera" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/esp-face" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6/tools/sdk/include/fb_gfx" -std=gnu++11 -Os -g3 -Wpointer-arith -fexceptions -fstack-protector -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -w -Wno-error=maybe-uninitialized -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-unused-but-set-parameter -Wno-missing-field-initializers -Wno-sign-compare -fno-rtti -MMD -c -DF_CPU=240000000L -DARDUINO=10816 -DARDUINO_ESP32_THING -DARDUINO_ARCH_ESP32 "-DARDUINO_BOARD=\"ESP32_THING\"" "-DARDUINO_VARIANT=\"esp32thing\"" -DESP32 -DCORE_DEBUG_LEVEL=0 "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\cores\\esp32" "-IC:\\Users\\Aaron\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.6\\variants\\esp32thing" "-IC:\\Users\\Aaron\\Documents\\Arduino\\libraries\\BasicLinearAlgebra" "C:\\Users\\Aaron\\AppData\\Local\\Temp\\arduino_build_665410\\sketch\\test.ino.cpp" -o "C:\\Users\\Aaron\\AppData\\Local\\Temp\\arduino_build_665410\\sketch\\test.ino.cpp.o"

In file included from C:\Users\Aaron\AppData\Local\Temp\arduino_build_665410\sketch\test.ino.cpp:1:0:

C:\Users\Aaron\Documents\Arduino\libraries\BasicLinearAlgebra/impl/NotSoBasicLinearAlgebra.h:14:22: error: expected unqualified-id before 'const'

 inline const T &_max(const T &a, const T &b)

                      ^

C:\Users\Aaron\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Arduino.h:183:21: note: in definition of macro '_max'

 #define _max(a,b) ((a)>(b)?(a):(b))

                     ^

C:\Users\Aaron\Documents\Arduino\libraries\BasicLinearAlgebra/impl/NotSoBasicLinearAlgebra.h:14:22: error: expected ')' before 'const'

 inline const T &_max(const T &a, const T &b)

                      ^

C:\Users\Aaron\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Arduino.h:183:21: note: in definition of macro '_max'

 #define _max(a,b) ((a)>(b)?(a):(b))

                     ^

C:\Users\Aaron\Documents\Arduino\libraries\BasicLinearAlgebra/impl/NotSoBasicLinearAlgebra.h:14:22: error: expected ')' before 'const'

 inline const T &_max(const T &a, const T &b)

                      ^

C:\Users\Aaron\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Arduino.h:183:21: note: in definition of macro '_max'

 #define _max(a,b) ((a)>(b)?(a):(b))

                     ^

C:\Users\Aaron\Documents\Arduino\libraries\BasicLinearAlgebra/impl/NotSoBasicLinearAlgebra.h:14:22: error: expected initializer before 'const'

 inline const T &_max(const T &a, const T &b)

                      ^

C:\Users\Aaron\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Arduino.h:183:21: note: in definition of macro '_max'

 #define _max(a,b) ((a)>(b)?(a):(b))

                     ^

Using library BasicLinearAlgebra at version 3.1 in folder: C:\Users\Aaron\Documents\Arduino\libraries\BasicLinearAlgebra 

exit status 1

Error compiling for board SparkFun ESP32 Thing.

Thank you for this library and any reccomendations you may have.

UPDATE: In the file \AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\cores\esp32\Arduino.h
the line

#define _max(a,b) ((a)>(b)?(a):(b))

is conflicting with the following lines in NotSoLinearAlgebra.h

template <typename T>
inline const T &_max(const T &a, const T &b)//mark
{
    return a > b ? a : b;
}

By commenting out those lines in NotSoLinearAlgebra.h it appears to fix the issue for both the BLA and Geometry libs, but this probably breaks the library for every board that isn't an ESP32...

Slicing matrix (0,0) element

Hey,

Let's say I've got Matrix
Matrix<3, 4> M={ 0, 1, 2, 3,
4, 5, 6, 7,
8, 9, 10, 11
};

I'm unable to get any sub matrix containing 0. Let's say just {0}
Serial << M.Submatrix(Slice<0, 1>(), Slice<0, 1>());// gives {1}
Serial << M.Submatrix(Slice<0, 1>(), Slice<0, 2>());// gives {1,2} this gives hope
Serial << M.Submatrix(Slice<0, 1>(), Slice<-1, 2>()) // gives {1,2,3}
Serial << M.Submatrix(Slice<0, 1>(), Slice<1, 2>()); // {1} again
Serial << M.Submatrix(Slice<0, 2>(), Slice<0, 1>());// gives {2,6}
Serial << M.Submatrix(Slice<0, 2>(), Slice<0, 2>());// gives {{2,3},{6,7}}
Serial << M.Submatrix(Slice<0, 0>(), Slice<0, 1>());// gives "{"

It seems to me:

template<int rows, int cols, class MemT>
template<int rowStart, int rowEnd, int colStart, int colEnd>
Matrix<rowEnd-rowStart,colEnd-colStart,Reference > Matrix<rows,cols,MemT>::Submatrix(Slice<rowStart,rowEnd>, Slice<colStart,colEnd>) const
{
Reference ref(delegate, rowStart, rowEnd); //<- rowEnd should be colStart line 140
return Matrix<rowEnd-rowStart,colEnd-colStart,Reference >(ref);
}

Regards Raffe :)

Handling the Matrix<1,1> case

Hi @tomstewart89,
writing a generic MxN Kalman filter using your library I've encountered a problem with handling the cases when an MxN matrix is multiplied by added to a 1x1 Matrix.

do you have any pointers on how to implement fix or work around?
thanks!

Inverse Matrix 3x3 false

Hello, im' new here, also i'm using this library. but during use invert function, isn't as i expected. i inverse matrix 3x3 rot={1, -1, 0, 1, 0, 0, 0, 0, 1};
inv_rot=Invert(rot); the result : pop: [[1.00,0.00,0.00],[0.00,0.00,0.00],[0.00,0.00,0.00]]
using wolfram online, i got true inverse matrix is : {0,1,0,-1,1,0,0,0,1}, here is my arduino code :

#include <BasicLinearAlgebra.h>
#include <math.h>

float j=1.57079672;
using namespace BLA;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}

void loop() {
// put your main code here, to run repeatedly:
BLA::Matrix<3, 3> rot;
BLA::Matrix<3, 3> inv_rot;
rot={1, -1, 0, 1, 0, 0, 0, 0, 1};
inv_rot=Invert(rot);
Serial << "pop: " << inv_rot << '\n';
}

thankyou,,,

edit: i tried the 3.5 version, there isn't problem,

Missing function

Hi,

Well I used to do some matlab programming and there is .* operator witch multiplies corresponding elements of two matrices: https://www.mathworks.com/help/matlab/ref/times.html

Since I'm finding your library very helpful (thank you) I've just added this function:

template<int rows, int cols, class MemT, class opMemT, class retMemT>
Matrix<rows,cols,retMemT> &ElementwiseMultiply(const Matrix<rows,cols,MemT> &A, const Matrix<rows,cols,opMemT> &B, Matrix<rows,cols,retMemT> &C)
{
for(int i = 0; i < rows; i++)
for(int j = 0; j < cols; j++)
C(i,j) = A(i,j) * B(i,j);

return C;

}

Just in case you'd like to add it to future versions of the library, go ahead .
Regards and have a nice day
Raffe :)

Suggestion: Overload for floats

It would be very helpful if I could multiplicate every element by a float using just matrix *= float. Also matrix2 = matrix1+float would be useful to add float to each element.

Delete a matrix instace

Hello, I am using you pack in a project , and I need to delete some matrix objecs, but I did not fount a proper function in the documentation, does a function like that exists?
I am using the Invert function like this: inv_a = Invert(A);

No loop?

Hey guys,

I am trying to get the matrix to work inside loops, but it won't comply. I am using the HowToUse example but I am adding "x;" to the loop.

Arduino: 1.8.3 (Windows 7), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

HowToUse.ino: In function 'void loop()':

HowToUse:112: error: 'x' was not declared in this scope

 void loop() { x; }

               ^

exit status 1
'x' was not declared in this scope

Not compatible with Streaming library

This compiles:
Serial << << "\n";

unless your sketch #include's <Streaming.h> to permit another line to:
Serial << << endl;

The BLA definition of '<<' clashes with that in Streaming. Had to replace second line with:
Serial.println();

which is annoying.

Cannot Multiply Two Matrices with nondefault type of double

When I try to multiply two matrices like so...

    Serial.begin(9600);
    Matrix<2, 2, double> B = {1, 0,
                              0, 1};

    Matrix<2, 2, double> A = {1, 0,
                              0, 2.3};

    Serial << (A * B) << '\n';

I get a compiler error telling me that "* is an invalid binary expression" for the types; however, even stranger, if the left matrix has double elements and the right matrix doesn't, the compiler error goes away.

    Serial.begin(9600);
    Matrix<2, 2, double> B = {1, 0,
                              0, 1};

    Matrix<2, 2> A = {1, 0,
                      0, 2.3};

    Serial << (A * B) << '\n';

The multiplication of normal matrices works as desired.

Invert appears to return improper results when using a double Array

I'm using a teensy 4.1 and the following code.

Matrix<6, 6, Array<6, 6, double>> motor_reductions = {
  1. / 48., 0, 0,         0, 0, 0,
  0, 1. / 48., 0,         0, 0, 0,
  0, -1. / 48., 1. / 48., 0, 0, 0,
  0, 0, 0,                 1. / 24., 0, 0,
  0, 0, 0,                -1. / 28.8, 1. / 28.8, 0,
  0, 0, 0,                -1. / 12., 1. / 24., 1. / 24.
};

Matrix<6, 6,Array<6,6,double>> degrees_per_step;
Matrix<6, 6,Array<6,6,double>> degrees_per_step_inv;

void setup(){
degrees_per_step = motor_reductions * ((360. / (double)SPR);
Invert(degrees_per_step, degrees_per_step_inv);
}
// degrees_per_step_inv(0,0) == 26.6666660308837891;
// When it should equal
// degrees_per_step_inv(0,0) == 26.666666666666668L;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.