PnetMatrix.empty constructor

PnetMatrix.empty(
  1. int x,
  2. int y
)

creates a new empty matrix given it's x width and y height

Implementation

PnetMatrix.empty(int x, int y){
    _m = pnetDylib.pnet_matrix_new_zero(x, y);

    if(pnetDylib.pnet_get_error() != pnet_error_t.pnet_info_ok){
        throw PnetException();
    }

    _finalizer.attach(this, _m.cast());                                         // call the finalizer on the native matrix when 'this' is GC'ed
}