Skip to content

Adds remove methods for all API classes#347

Merged
DrPaulSharp merged 3 commits into
RascalSoftware:masterfrom
DrPaulSharp:delete
Feb 18, 2025
Merged

Adds remove methods for all API classes#347
DrPaulSharp merged 3 commits into
RascalSoftware:masterfrom
DrPaulSharp:delete

Conversation

@DrPaulSharp

Copy link
Copy Markdown
Collaborator

Closes #340

Comment thread tests/testTableUtilities.m Outdated
Comment thread tests/testDataClass.m Outdated
Comment thread API/projectClass/tableUtilities.m Outdated

obj.varTable(row, :) = [];

indices = sort(indices, 'descend');

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the indices are sorted here, the sort on line 60 is not needed. Also the for loop below is not needed since indices is sorted.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the input is a cell array of multiple row names, the resulting indices array will not be sorted, so it is needed here. There's also no guarantee that a list of rows provided is valid so I think the for loop is still needed too.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh, sorry. Misread here. I'll take out the sort on line 60 too.

end
end

obj.varTable(indices, :) = [];

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line should work with unsorted indices so maybe the sort can be removed

@DrPaulSharp DrPaulSharp merged commit 34375c2 into RascalSoftware:master Feb 18, 2025
@DrPaulSharp DrPaulSharp deleted the delete branch February 18, 2025 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make setContrast accept the model also and update remove method in project class

2 participants