Skip to content

Commit

Permalink
Per #1019, add NumArray constructor using a vector of doubles.
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnHalleyGotway committed Jan 7, 2025
1 parent 30bf0b7 commit 834b5d7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/basic/vx_util/num_array.cc
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,24 @@ NumArray::NumArray(const NumArray & a)
////////////////////////////////////////////////////////////////////////


NumArray::NumArray(const vector<double> & a)

{

clear();

e = a;

Sorted = false;

return;

}


////////////////////////////////////////////////////////////////////////


NumArray & NumArray::operator=(const NumArray & a)

{
Expand Down
1 change: 1 addition & 0 deletions src/basic/vx_util/num_array.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class NumArray {
NumArray();
~NumArray();
NumArray(const NumArray &);
NumArray(const std::vector<double> &);
NumArray & operator=(const NumArray &);
bool operator==(const NumArray &) const;

Expand Down

0 comments on commit 834b5d7

Please sign in to comment.