@@ -21,7 +21,7 @@ const_N_Vector AmiVector::getNVector() const { return nvec_; }
2121
2222std::vector<realtype> const & AmiVector::getVector () const { return vec_; }
2323
24- int AmiVector::getLength () const { return gsl::narrow<int >(vec_.size ()); }
24+ int AmiVector::size () const { return gsl::narrow<int >(vec_.size ()); }
2525
2626void AmiVector::zero () { set (0.0 ); }
2727
@@ -48,11 +48,11 @@ realtype const& AmiVector::at(int const pos) const {
4848}
4949
5050void AmiVector::copy (AmiVector const & other) {
51- if (getLength () != other.getLength ())
51+ if (size () != other.size ())
5252 throw AmiException (
5353 " Dimension of AmiVector (%i) does not "
5454 " match input dimension (%i)" ,
55- getLength (), other.getLength ()
55+ size (), other.size ()
5656 );
5757 std::ranges::copy (other.vec_ , vec_.begin ());
5858}
@@ -85,17 +85,17 @@ AmiVectorArray::AmiVectorArray(
8585
8686AmiVectorArray& AmiVectorArray::operator =(AmiVectorArray const & other) {
8787 vec_array_ = other.vec_array_ ;
88- nvec_array_.resize (other.getLength ());
89- for (int idx = 0 ; idx < other.getLength (); idx++) {
88+ nvec_array_.resize (other.size ());
89+ for (int idx = 0 ; idx < other.size (); idx++) {
9090 nvec_array_.at (idx) = vec_array_.at (idx).getNVector ();
9191 }
9292 return *this ;
9393}
9494
9595AmiVectorArray::AmiVectorArray (AmiVectorArray const & vaold)
9696 : vec_array_(vaold.vec_array_) {
97- nvec_array_.resize (vaold.getLength ());
98- for (int idx = 0 ; idx < vaold.getLength (); idx++) {
97+ nvec_array_.resize (vaold.size ());
98+ for (int idx = 0 ; idx < vaold.size (); idx++) {
9999 nvec_array_.at (idx) = vec_array_.at (idx).getNVector ();
100100 }
101101}
@@ -132,7 +132,7 @@ AmiVector const& AmiVectorArray::operator[](int const pos) const {
132132 return vec_array_.at (pos);
133133}
134134
135- int AmiVectorArray::getLength () const {
135+ int AmiVectorArray::size () const {
136136 return gsl::narrow<int >(vec_array_.size ());
137137}
138138
@@ -145,7 +145,7 @@ void AmiVectorArray::flatten_to_vector(std::vector<realtype>& vec) const {
145145 int n_outer = gsl::narrow<int >(vec_array_.size ());
146146 if (n_outer == 0 )
147147 return ; // nothing to do ...
148- int n_inner = vec_array_.at (0 ).getLength ();
148+ int n_inner = vec_array_.at (0 ).size ();
149149
150150 if (gsl::narrow<int >(vec.size ()) != n_inner * n_outer) {
151151 throw AmiException (
@@ -162,14 +162,14 @@ void AmiVectorArray::flatten_to_vector(std::vector<realtype>& vec) const {
162162}
163163
164164void AmiVectorArray::copy (AmiVectorArray const & other) {
165- if (getLength () != other.getLength ())
165+ if (size () != other.size ())
166166 throw AmiException (
167167 " Dimension of AmiVectorArray (%i) does not "
168168 " match input dimension (%i)" ,
169- getLength (), other.getLength ()
169+ size (), other.size ()
170170 );
171171
172- for (int iv = 0 ; iv < getLength (); ++iv) {
172+ for (int iv = 0 ; iv < size (); ++iv) {
173173 vec_array_.at (iv).copy (other.vec_array_ .at (iv));
174174 nvec_array_[iv] = vec_array_.at (iv).getNVector ();
175175 }
0 commit comments