Skip to main content
`Ctrl`+`K`

# MATCOMPOSITE

A matrix defined by the sum (or product) of one or more matrices. The matrices need to have a correct size and parallel layout for the sum or product to be valid.

## Note

To use the product of the matrices call `MatCompositeSetType`(mat,`MAT_COMPOSITE_MULTIPLICATIVE`);

## Developer Notes

This is implemented on top of `MATSHELL` to get support for scaling and shifting without requiring duplicate code

Users can not call `MatShellSetOperation()` operations on this class, there is some error checking for that incorrect usage

## See Also

Matrices, `Mat`, `MatCreateComposite()`, `MatCompositeSetScalings()`, `MatCompositeAddMat()`, `MatSetType()`, `MatCompositeSetType()`, `MatCompositeGetType()`, `MatCompositeSetMatStructure()`, `MatCompositeGetMatStructure()`, `MatCompositeMerge()`, `MatCompositeSetMergeType()`, `MatCompositeGetNumberMat()`, `MatCompositeGetMat()`

## Level

advanced

## Location

src/mat/impls/composite/mcomposite.c

Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages