RootTalk


ROOT Discussion Forums

Add functions to TMatrix and friends

Discuss your own ROOT application.

Moderator: rootdev

Add functions to TMatrix and friends

Postby pdbarnes » Wed Apr 08, 2009 23:21

Hello Folks,

I needed to do a lot of mixed vector/matrix expressions, such as
Code: Select all
double   s = v1 * M * v2;  // e.g., physics matrix element
TMatrixD M = v1' * v2      // outer product of v1 and v2

The attached files implement these functions, along with vector/matrix AreCompatible functions.

Enjoy,
Peter
Attachments
NGMTMatrix.h
Template definitions.
(6.24 KiB) Downloaded 206 times
NGMTMatrix.cpp
Template instantiations.
(1.79 KiB) Downloaded 145 times
pdbarnes
 
Posts: 13
Joined: Wed Dec 17, 2008 20:00
Location: Lawrence Livermore National Laboratory

Postby moneta » Thu Apr 16, 2009 17:32

Hello Peter,

Thank you very much for your contribution. We will review in the next days the missing functions in the Matrix classes and implement them using your contributed code.

With best regards

Lorenzo
moneta
 
Posts: 1657
Joined: Fri Jun 03, 2005 14:38
Location: CERN

Postby brun » Mon Sep 14, 2009 6:14

Hi Peter,

Your extensions to the matrix package are now in the SVN trunk.
Thanks very much for this interesting contribution and thanks to Eddy Offermann for doing the integration.

Rene
User avatar
brun
 
Posts: 5823
Joined: Wed Aug 27, 2003 9:49
Location: CERN


Return to My ROOT App

Who is online

Users browsing this forum: No registered users and 0 guests