You can use the code in `computeGramianMatrix` as an example.