MeshLib C Docs
Loading...
Searching...
No Matches
MRMatrix.h File Reference
#include <MRCMesh/MRId.h>
#include <MRCMisc/common.h>
#include <MRCMisc/exports.h>
#include <stddef.h>

Go to the source code of this file.

Typedefs

typedef struct MR_RectIndexer MR_RectIndexer
 
typedef struct MR_Vector2i MR_Vector2i
 
typedef struct MR_std_vector_float MR_std_vector_float
 
typedef struct MR_Matrix_float MR_Matrix_float
 

Functions

MRC_API MR_Matrix_floatMR_Matrix_float_DefaultConstruct (void)
 
MRC_API MR_Matrix_floatMR_Matrix_float_DefaultConstructArray (size_t num_elems)
 
MRC_API const MR_Matrix_floatMR_Matrix_float_OffsetPtr (const MR_Matrix_float *ptr, ptrdiff_t i)
 Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element.
 
MRC_API MR_Matrix_floatMR_Matrix_float_OffsetMutablePtr (MR_Matrix_float *ptr, ptrdiff_t i)
 Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element.
 
MRC_API const MR_RectIndexerMR_Matrix_float_UpcastTo_MR_RectIndexer (const MR_Matrix_float *object)
 
MRC_API MR_RectIndexerMR_Matrix_float_MutableUpcastTo_MR_RectIndexer (MR_Matrix_float *object)
 Upcasts an instance of MR::Matrix<float> to its base class MR::RectIndexer.
 
MRC_API MR_Matrix_floatMR_Matrix_float_ConstructFromAnother (MR_PassBy _other_pass_by, MR_Matrix_float *_other)
 
MRC_API MR_Matrix_floatMR_Matrix_float_Construct (MR_uint64_t numRows, MR_uint64_t numCols)
 
MRC_API void MR_Matrix_float_Destroy (const MR_Matrix_float *_this)
 Destroys a heap-allocated instance of MR_Matrix_float. Does nothing if the pointer is null.
 
MRC_API void MR_Matrix_float_DestroyArray (const MR_Matrix_float *_this)
 Destroys a heap-allocated array of MR_Matrix_float. Does nothing if the pointer is null.
 
MRC_API MR_Matrix_floatMR_Matrix_float_AssignFromAnother (MR_Matrix_float *_this, MR_PassBy _other_pass_by, MR_Matrix_float *_other)
 
MRC_API float * MR_Matrix_float_call_2 (MR_Matrix_float *_this, MR_uint64_t row, MR_uint64_t col)
 
MRC_API float * MR_Matrix_float_call_1 (MR_Matrix_float *_this, MR_uint64_t i)
 
MRC_API const float * MR_Matrix_float_call_const_2 (const MR_Matrix_float *_this, MR_uint64_t row, MR_uint64_t col)
 
MRC_API const float * MR_Matrix_float_call_const_1 (const MR_Matrix_float *_this, MR_uint64_t i)
 
MRC_API MR_Matrix_floatMR_Matrix_float_getSubMatrix (MR_Matrix_float *_this, MR_uint64_t startRow, MR_uint64_t nRow, MR_uint64_t startCol, MR_uint64_t nCol)
 
MRC_API MR_Matrix_floatMR_Matrix_float_transposed (const MR_Matrix_float *_this)
 
MRC_API void MR_Matrix_float_fill (MR_Matrix_float *_this, float val)
 
MRC_API void MR_Matrix_float_clear (MR_Matrix_float *_this)
 
MRC_API MR_uint64_t MR_Matrix_float_getRowsNum (const MR_Matrix_float *_this)
 
MRC_API MR_uint64_t MR_Matrix_float_getColsNum (const MR_Matrix_float *_this)
 
MRC_API const MR_std_vector_floatMR_Matrix_float_data (const MR_Matrix_float *_this)
 
MRC_API void MR_Matrix_float_resize (MR_Matrix_float *_this, const MR_Vector2i *dims)
 
MRC_API const MR_Vector2iMR_Matrix_float_dims (const MR_Matrix_float *_this)
 
MRC_API MR_uint64_t MR_Matrix_float_size (const MR_Matrix_float *_this)
 
MRC_API MR_PixelId MR_Matrix_float_toPixelId (const MR_Matrix_float *_this, const MR_Vector2i *pos)
 
MRC_API MR_uint64_t MR_Matrix_float_toIndex (const MR_Matrix_float *_this, const MR_Vector2i *pos)
 

Typedef Documentation

◆ MR_Matrix_float

Row-major matrix with T values Generated from class MR::Matrix<float>. Base classes: Direct: (non-virtual) MR::RectIndexer Supported MR_PassBy modes: MR_PassBy_DefaultConstruct, MR_PassBy_Copy, MR_PassBy_Move (and MR_PassBy_DefaultArgument and MR_PassBy_NoObject if supported by the callee).

◆ MR_RectIndexer

◆ MR_std_vector_float

◆ MR_Vector2i

typedef struct MR_Vector2i MR_Vector2i

Function Documentation

◆ MR_Matrix_float_AssignFromAnother()

MRC_API MR_Matrix_float * MR_Matrix_float_AssignFromAnother ( MR_Matrix_float * _this,
MR_PassBy _other_pass_by,
MR_Matrix_float * _other )

Generated from method MR::Matrix<float>::operator=. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_Matrix_float_call_1()

MRC_API float * MR_Matrix_float_call_1 ( MR_Matrix_float * _this,
MR_uint64_t i )

Generated from method MR::Matrix<float>::operator(). Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_Matrix_float_call_2()

MRC_API float * MR_Matrix_float_call_2 ( MR_Matrix_float * _this,
MR_uint64_t row,
MR_uint64_t col )

main access method Generated from method MR::Matrix<float>::operator(). Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_Matrix_float_call_const_1()

MRC_API const float * MR_Matrix_float_call_const_1 ( const MR_Matrix_float * _this,
MR_uint64_t i )

Generated from method MR::Matrix<float>::operator(). Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_Matrix_float_call_const_2()

MRC_API const float * MR_Matrix_float_call_const_2 ( const MR_Matrix_float * _this,
MR_uint64_t row,
MR_uint64_t col )

Generated from method MR::Matrix<float>::operator(). Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_Matrix_float_clear()

MRC_API void MR_Matrix_float_clear ( MR_Matrix_float * _this)

Generated from method MR::Matrix<float>::clear. Parameter _this can not be null. It is a single object.

◆ MR_Matrix_float_Construct()

MRC_API MR_Matrix_float * MR_Matrix_float_Construct ( MR_uint64_t numRows,
MR_uint64_t numCols )

Generated from constructor MR::Matrix<float>::Matrix. Never returns null. Returns an instance allocated on the heap! Must call MR_Matrix_float_Destroy() to free it when you're done using it.

◆ MR_Matrix_float_ConstructFromAnother()

MRC_API MR_Matrix_float * MR_Matrix_float_ConstructFromAnother ( MR_PassBy _other_pass_by,
MR_Matrix_float * _other )

Generated from constructor MR::Matrix<float>::Matrix. Never returns null. Returns an instance allocated on the heap! Must call MR_Matrix_float_Destroy() to free it when you're done using it.

◆ MR_Matrix_float_data()

MRC_API const MR_std_vector_float * MR_Matrix_float_data ( const MR_Matrix_float * _this)

Generated from method MR::Matrix<float>::data. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_Matrix_float_DefaultConstruct()

MRC_API MR_Matrix_float * MR_Matrix_float_DefaultConstruct ( void )

Constructs an empty (default-constructed) instance. Never returns null. Returns an instance allocated on the heap! Must call MR_Matrix_float_Destroy() to free it when you're done using it.

◆ MR_Matrix_float_DefaultConstructArray()

MRC_API MR_Matrix_float * MR_Matrix_float_DefaultConstructArray ( size_t num_elems)

Constructs an array of empty (default-constructed) instances, of the specified size. Will never return null. The array must be destroyed using MR_Matrix_float_DestroyArray(). Use MR_Matrix_float_OffsetMutablePtr() and MR_Matrix_float_OffsetPtr() to access the array elements.

◆ MR_Matrix_float_Destroy()

MRC_API void MR_Matrix_float_Destroy ( const MR_Matrix_float * _this)

Destroys a heap-allocated instance of MR_Matrix_float. Does nothing if the pointer is null.

◆ MR_Matrix_float_DestroyArray()

MRC_API void MR_Matrix_float_DestroyArray ( const MR_Matrix_float * _this)

Destroys a heap-allocated array of MR_Matrix_float. Does nothing if the pointer is null.

◆ MR_Matrix_float_dims()

MRC_API const MR_Vector2i * MR_Matrix_float_dims ( const MR_Matrix_float * _this)

Generated from method MR::Matrix<float>::dims. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_Matrix_float_fill()

MRC_API void MR_Matrix_float_fill ( MR_Matrix_float * _this,
float val )

Generated from method MR::Matrix<float>::fill. Parameter _this can not be null. It is a single object.

◆ MR_Matrix_float_getColsNum()

MRC_API MR_uint64_t MR_Matrix_float_getColsNum ( const MR_Matrix_float * _this)

Generated from method MR::Matrix<float>::getColsNum. Parameter _this can not be null. It is a single object.

◆ MR_Matrix_float_getRowsNum()

MRC_API MR_uint64_t MR_Matrix_float_getRowsNum ( const MR_Matrix_float * _this)

Generated from method MR::Matrix<float>::getRowsNum. Parameter _this can not be null. It is a single object.

◆ MR_Matrix_float_getSubMatrix()

MRC_API MR_Matrix_float * MR_Matrix_float_getSubMatrix ( MR_Matrix_float * _this,
MR_uint64_t startRow,
MR_uint64_t nRow,
MR_uint64_t startCol,
MR_uint64_t nCol )

Generated from method MR::Matrix<float>::getSubMatrix. Parameter _this can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_Matrix_float_Destroy() to free it when you're done using it.

◆ MR_Matrix_float_MutableUpcastTo_MR_RectIndexer()

MRC_API MR_RectIndexer * MR_Matrix_float_MutableUpcastTo_MR_RectIndexer ( MR_Matrix_float * object)

Upcasts an instance of MR::Matrix<float> to its base class MR::RectIndexer.

◆ MR_Matrix_float_OffsetMutablePtr()

MRC_API MR_Matrix_float * MR_Matrix_float_OffsetMutablePtr ( MR_Matrix_float * ptr,
ptrdiff_t i )

Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element.

◆ MR_Matrix_float_OffsetPtr()

MRC_API const MR_Matrix_float * MR_Matrix_float_OffsetPtr ( const MR_Matrix_float * ptr,
ptrdiff_t i )

Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element.

◆ MR_Matrix_float_resize()

MRC_API void MR_Matrix_float_resize ( MR_Matrix_float * _this,
const MR_Vector2i * dims )

Generated from method MR::Matrix<float>::resize. Parameter _this can not be null. It is a single object. Parameter dims can not be null. It is a single object.

◆ MR_Matrix_float_size()

MRC_API MR_uint64_t MR_Matrix_float_size ( const MR_Matrix_float * _this)

Generated from method MR::Matrix<float>::size. Parameter _this can not be null. It is a single object.

◆ MR_Matrix_float_toIndex()

MRC_API MR_uint64_t MR_Matrix_float_toIndex ( const MR_Matrix_float * _this,
const MR_Vector2i * pos )

Generated from method MR::Matrix<float>::toIndex. Parameter _this can not be null. It is a single object. Parameter pos can not be null. It is a single object.

◆ MR_Matrix_float_toPixelId()

MRC_API MR_PixelId MR_Matrix_float_toPixelId ( const MR_Matrix_float * _this,
const MR_Vector2i * pos )

Generated from method MR::Matrix<float>::toPixelId. Parameter _this can not be null. It is a single object. Parameter pos can not be null. It is a single object.

◆ MR_Matrix_float_transposed()

MRC_API MR_Matrix_float * MR_Matrix_float_transposed ( const MR_Matrix_float * _this)

computes transposed matrix Generated from method MR::Matrix<float>::transposed. Parameter _this can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_Matrix_float_Destroy() to free it when you're done using it.

◆ MR_Matrix_float_UpcastTo_MR_RectIndexer()

MRC_API const MR_RectIndexer * MR_Matrix_float_UpcastTo_MR_RectIndexer ( const MR_Matrix_float * object)

Upcasts an instance of MR::Matrix<float> to its base class MR::RectIndexer. This version is acting on mutable pointers.