Internal helper to create a new reporting_triangle from modified matrix data while preserving the original object's metadata (reference dates, delays_unit). This simplifies the pattern of converting to matrix, operating on it, then restoring the reporting_triangle class and attributes.
.update_triangle_matrix(reporting_triangle, new_matrix, reference_dates = NULL)A new reporting_triangle object with the updated matrix data.
The original reporting_triangle object.
The modified matrix data.
Optional. Reference dates for the new matrix. If NULL, extracts from the original reporting_triangle object.