bebuch / mitrax Goto Github PK
View Code? Open in Web Editor NEWA C++17 Matrix library
License: Boost Software License 1.0
A C++17 Matrix library
License: Boost Software License 1.0
change
make_matrix(x, y, default)
to
make_matrix_by_default(x, y, default = T())
This makes better error messages for failures like:
make_matrix(x, y, function) // ops, I did mean make_matrix_by_function!
The information about value_type, cols and rows is only needed for implicit initialization with an array. If the array have been explicit defined, then can the compiler extract the information from the parameter:
int data[2][2] = {{0, 1}, {2, 3}};
make_matrix(data); // same as make_matrix< int >(2_C, 2_R, d)
Instead of making the underlaying matrix-type a template parameter, define a type-trait for matrix types and use enable_if to enable the algorithms.
(This is a spontaneous idea, don't know if it will work!)
Use std::unique_ptr instead of boost::container::vector.
-> less dependencies
std::is_default_constructible
std::is_copy_constructible
std::is_move_constructible
โฆ
#include <iostream>
struct A{};
struct B{};
struct dim: private A, private B{};
struct C: dim{ int v; };
int main(){
std::cout << sizeof(A) << std::endl;
std::cout << sizeof(B) << std::endl;
std::cout << sizeof(dim) << std::endl;
std::cout << sizeof(C) << std::endl;
}
Output:
1
1
1
4
std::invoke is not constexpr.
separate ct dims from dim args and array dims and compare them by static_assert
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.