Ticket #558 (closed: fixed)

Opened 11 years ago

Last modified 5 years ago

Remove the Workspace2D setX methods that copy a vector internally

Reported by: Russell Taylor Owned by: Russell Taylor
Priority: major Milestone: Iteration 17
Component: Keywords:
Cc: Blocked By:
Blocking: Tester:

Description

This is never necessary, when a workspace is initialised all the vectors of its storage are created even if their just filled with zeroes. So the correct access approach is to take a reference to the vector and modify that.

Change History

comment:1 Changed 11 years ago by Russell Taylor

  • Status changed from new to assigned

comment:2 Changed 11 years ago by Russell Taylor

(In [2395]) Eliminated the variant of Workspace2D::setX/setData that takes a const reference to a vector and then copies it inside. This is inefficient since the vectors already exist once the workspace is initialized. The correct way is to take a reference to the MantidVec and assign directly to that. Re #558.

comment:3 Changed 11 years ago by Russell Taylor

(In [2396]) Fixed examples of how not to manipulate workspace data. Re #558.

comment:4 Changed 11 years ago by Russell Taylor

(In [2398]) Removed the same setX/Data methods from Workspace1D for consistency. Re #558.

comment:5 Changed 11 years ago by Russell Taylor

(In [2402]) Clear some warnings. Re #558.

comment:6 Changed 11 years ago by Russell Taylor

  • Status changed from assigned to closed
  • Resolution set to fixed

comment:7 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 1406

Note: See TracTickets for help on using tickets.