Set matrix and shift vector in AFPChain as well as AFP.