Skip to content

FrancoisSestier/matrix_layer_stack

Repository files navigation

Windows Ubuntu codecov License: Unlicense

Matrix Layer Stack

stack of same sized matrices with heterogeneous types

Goal

represent and access a 2d grid of heterogeneous type easily

Usage Design

    
    //Strong typing for integral and floating_point types

    using elevation = s_int16_t<struct elevation_tag>;
    using tile_id = s_int16_t<struct tile_id_tag>;

    //define matrix stack size and data structure

    using chunk = matrix_tuple<256, 256, elevation, tile_id>;

    chunk ck;

 
    // access
        
    auto [elevation_, tile_id_] = ck.get<elevation, tile_id>(10, 30);

    // modify
        
    elevation_ = 50;
    tile_id_ = 10;