Abstract vector-multiplier type

There are no general “interfaces” in Julia (lots of discussions about them). Specific functions, even within the umbrella of “Linear Algebra” may required different properties from the input. This is sometimes specified on dispatch (like different methods for diagonal or sparse arrays), sometimes if the input does not satisfy the expected requirements you will get an error down the line (like if the * operation was not defined for the elements of the matrix, the error will appear the first time that is tried).

If you are implementing your CG algorithm, you can well take care of it being generic for the types you are willing to use. Or, if you think the type you are creating is important enough, you may even test the CG algorithm implemented in some well maintained package, and see if you can contribute to it by making it generic to your type as well (if it isn’t already).