comparison liboctave/Array.cc @ 10674:e3064439d6b4

new Array method for internal use
author Jaroslav Hajek <highegg@gmail.com>
date Tue, 01 Jun 2010 12:34:16 +0200
parents b17a966099ed
children 0ba9bd294421
comparison
equal deleted inserted replaced
10673:b17a966099ed 10674:e3064439d6b4
2569 // << pefix << "rows: " << rows () << "\n" 2569 // << pefix << "rows: " << rows () << "\n"
2570 // << prefix << "cols: " << cols () << "\n"; 2570 // << prefix << "cols: " << cols () << "\n";
2571 } 2571 }
2572 2572
2573 template <class T> 2573 template <class T>
2574 bool Array<T>::optimize_dimensions (const dim_vector& dv)
2575 {
2576 bool retval = dimensions == dv;
2577 if (retval)
2578 dimensions = dv;
2579
2580 return retval;
2581 }
2582
2583 template <class T>
2574 void Array<T>::instantiation_guard () 2584 void Array<T>::instantiation_guard ()
2575 { 2585 {
2576 // This guards against accidental implicit instantiations. 2586 // This guards against accidental implicit instantiations.
2577 // Array<T> instances should always be explicit and use INSTANTIATE_ARRAY. 2587 // Array<T> instances should always be explicit and use INSTANTIATE_ARRAY.
2578 T::__xXxXx__(); 2588 T::__xXxXx__();