Class to store a gradient