def K(self): if self.dim > _MAX_DIM: raise TooExpensiveOperationError(msg_too_expensive_dim(my_name(), _MAX_DIM)) rv = sp.kron(self.Cg.K(), self.R) + sp.kron(self.Cn.K(), sp.eye(self.dim_r)) return rv
def K_grad_i(self, i): nCg = self.Cg.getNumberParams() if i >= self.getNumberParams(): raise ValueError("Trying to retrieve the gradient over a " "parameter that is inactive.") if self.dim > _MAX_DIM: raise TooExpensiveOperationError( msg_too_expensive_dim(my_name(), _MAX_DIM)) i = self._actindex2index(i) if i < nCg: rv = sp.kron(self.Cg.K_grad_i(i), self.R) else: _i = i - nCg rv = sp.kron(self.Cn.K_grad_i(_i), sp.eye(self.dim_r)) return rv
def K_grad_i(self,i): nCg = self.Cg.getNumberParams() if i >= self.getNumberParams(): raise ValueError("Trying to retrieve the gradient over a " "parameter that is inactive.") if self.dim > _MAX_DIM: raise TooExpensiveOperationError(msg_too_expensive_dim(my_name(), _MAX_DIM)) i = self._actindex2index(i) if i < nCg: rv= sp.kron(self.Cg.K_grad_i(i), self.R) else: _i = i - nCg rv = sp.kron(self.Cn.K_grad_i(_i), sp.eye(self.dim_r)) return rv
def L(self): if self.dim > _MAX_DIM: raise TooExpensiveOperationError( msg_too_expensive_dim(my_name(), _MAX_DIM)) return sp.kron(self.Lc(), self.Lr())
def GG(self): if self.dim > _MAX_DIM: raise TooExpensiveOperationError(msg_too_expensive_dim(my_name(), _MAX_DIM)) return sp.dot(self.G, self.G.T)
def L(self): if self.dim > _MAX_DIM: raise TooExpensiveOperationError(msg_too_expensive_dim(my_name(), _MAX_DIM)) return sp.kron(self.Lc(), self.Lr())