@@ -0,0 +1,1640 @@
+package org.kevoree.modeling.util.maths.structure.impl;%0A%0Aimport org.kevoree.modeling.memory.chunk.KObjectChunk;%0Aimport org.kevoree.modeling.meta.KMetaClass;%0Aimport org.kevoree.modeling.util.maths.structure.KArray2D;%0A%0Apublic class NativeArray2D implements KArray2D %7B%0A%0A    private int _nbRows;%0A%0A    private int _nbColumns;%0A%0A    private int _offset;%0A%0A    private int _segmentIndex;%0A%0A    private KObjectChunk _segment;%0A%0A    private KMetaClass _metaClass;%0A%0A    public NativeArray2D(int p_nbRows, int p_nbColumns, int p_offset, int p_segmentIndex, KObjectChunk p_segment, KMetaClass p_metaClass) %7B%0A        this._nbRows = p_nbRows;%0A        this._nbColumns = p_nbColumns;%0A        this._offset = p_offset;%0A        this._segment = p_segment;%0A        this._segmentIndex = p_segmentIndex;%0A        this._metaClass = p_metaClass;%0A    %7D%0A%0A    @Override%0A    public int nbRows() %7B%0A        return this._nbRows;%0A    %7D%0A%0A    @Override%0A    public int nbColumns() %7B%0A        return this._nbColumns;%0A    %7D%0A%0A    @Override%0A    public double get(int p_rowIndex, int p_columnIndex) %7B%0A        return this._segment.getDoubleArrayElem(this._segmentIndex, this._offset + (p_rowIndex * this._nbColumns) + p_columnIndex, this._metaClass);%0A    %7D%0A%0A    @Override%0A    public double set(int p_rowIndex, int p_columnIndex, double value) %7B%0A        this._segment.setDoubleArrayElem(this._segmentIndex, this._offset + (p_rowIndex * this._nbColumns) + p_columnIndex, value, this._metaClass);%0A        return value;%0A    %7D%0A%0A    @Override%0A    public double add(int rawIndex, int columnIndex, double value) %7B%0A        return set(rawIndex,columnIndex,get(rawIndex,columnIndex)+value);%0A    %7D%0A%7D%0A

add NativeArray2D