Topic/plat 6703

The k^th order difference matrix will act on a vector to produce the k^th order difference series.  Related to this is the k^th order finite difference differentiation matrix which acts on the values of a function evaluated at a (non-uniformly spaced) set of points, to give the estimate of the k^th order derivative at those points (for unit spaces points these are identical). 
One use of these matrices, is to  provide matrices that penalise the gradient or curvature of data on a non-uniform grid. This should work for an arbitrary number of dimensions (for data that has been flattened to a vector). 
If you have tests with common setup that test different things then you can do the setup in a data provider function, which is annotated `@DataProvider`, then pass the data providers to each test that uses them as part of the test annotation - i.e. `@Test(dataProvider = "<data provider function name>")`. TestNG will then invoke the test with items from the data provider as arguments to your test function. As an example, see https://github.com/OpenGamma/OG-Maths/blob/master/src/java/src/test/java/com/opengamma/maths/testnodes/TestTimesMaterialise.java - the data provider called `dataContainer` is used in both the `materialiseToJDoubleArray()` and `materialiseToOGTerminal()` tests.

You can also use this to invoke the same test function multiple times with different data - when you write the data provider function, the first array index of the 2D array that it returns is used to index the test invocation, and the second index is the index into the arguments to the test function. So a data provider returning Object[3][2] will invoke a two-argument test function three times.