I am solving some problems in "quantum graphs." Without getting into the detail, I have a directed graph, built as a MATLAB digraph object. On each edge, I have defined a coordinate x, given as a discrete sequence of x values, and a function y(x) which is an array of the same size.
To do any computations on this object, I have a routine that reorders all the y-values into a column vector. I do all my computations on this column vector. Then I have another routine to convert the column vector of y-values into a graph with the same same structure as my original graph.
For reasons of problem abstraction, I would like to be able to add and subtract these y-values in place, and to multiply them by scalars, without first converting to column vectors and then converting back. I'm using MATLAB's digraph objects to build these quantum graphs. Can I somehow overload plus, times, minus, etc to work on digraphs? I'm a bit confused, since it's not a class I've defined myself.
Best Answer