MCPcopy Create free account
hub / github.com/QuEST-Kit/QuEST / demo_setInlineDiagMatr

Function demo_setInlineDiagMatr

examples/isolated/initialising_matrices.cpp:260–273  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

258
259
260void demo_setInlineDiagMatr() {
261
262 // inline literal; identical to setDiagMatr() for consistencty with C API
263 DiagMatr a = createDiagMatr(1);
264 setInlineDiagMatr(a, 1, {333, 444});
265 reportDiagMatr(a);
266 destroyDiagMatr(a);
267
268 // we must specify all elements (only necessary in C++)
269 DiagMatr b = createDiagMatr(3);
270 setInlineDiagMatr(b, 3, {4,5,4,5,6,7,6,7_i});
271 reportDiagMatr(b);
272 destroyDiagMatr(b);
273}
274
275
276

Callers 1

mainFunction · 0.70

Calls 4

createDiagMatrFunction · 0.85
setInlineDiagMatrFunction · 0.85
reportDiagMatrFunction · 0.85
destroyDiagMatrFunction · 0.85

Tested by

no test coverage detected