Git Product home page Git Product logo

mitrax's People

Contributors

bebuch avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

respu ahnan4arch

mitrax's Issues

rename make-function for default initialization

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!

initialization with explicit 2D-Arrays

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)

Concept-like matrix type

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!)

eliminate size overhead for compile time dimensions

#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

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.