MCPcopy Create free account
hub / github.com/ComputationalRobotics/XM-code / process_observation_old

Function process_observation_old

utils/creatematrix.py:34–49  ·  view source on GitHub ↗
(i, observation_index, landmarks, weight)

Source from the content-addressed store, hash-verified

32
33
34def process_observation_old(i, observation_index, landmarks, weight):
35 # Get indices for observation i
36 ind = observation_index.getrow(i)
37 ind_l = ind.indices
38 ind = ind.data - 1 # Adjust for zero-based indexing
39
40 # Compute weighted landmarks
41 v = landmarks[ind, :] * weight[ind][:, None]
42
43 # Calculate blocks to update the sparse matrices
44 Q1_block = v.T @ landmarks[ind, :]
45 V1_block = v.sum(axis=0)[:, None]
46 V2_block = v.T
47
48 # Return the computed blocks with their indices
49 return i, Q1_block, V1_block, V2_block, ind_l
50
51# create matrix function
52def create_matrix(weight, edges, landmarks, output_path):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected