3b010a74 |
1 | // Copyright (c) 1997-1999 Matra Datavision |
2 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
3 | // |
4 | // This file is part of Open CASCADE Technology software library. |
5 | // |
d5f74e42 |
6 | // This library is free software; you can redistribute it and/or modify it under |
7 | // the terms of the GNU Lesser General Public License version 2.1 as published |
3b010a74 |
8 | // by the Free Software Foundation, with special exception defined in the file |
9 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
10 | // distribution for complete text of the license and disclaimer of any warranty. |
11 | // |
12 | // Alternatively, this file may be used under the terms of Open CASCADE |
13 | // commercial license or contractual agreement. |
14 | |
15 | #ifndef _math_Vector_HeaderFile |
16 | #define _math_Vector_HeaderFile |
17 | |
1103eb60 |
18 | #include <math_VectorBase.hxx> |
3b010a74 |
19 | |
20 | //! This class implements the real vector abstract data type. |
21 | //! Vectors can have an arbitrary range which must be defined at |
22 | //! the declaration and cannot be changed after this declaration. |
23 | //! @code |
24 | //! math_Vector V1(-3, 5); // a vector with range [-3..5] |
25 | //! @endcode |
26 | //! |
5e6e5914 |
27 | //! Vector are copied through assignment: |
3b010a74 |
28 | //! @code |
29 | //! math_Vector V2( 1, 9); |
30 | //! .... |
31 | //! V2 = V1; |
32 | //! V1(1) = 2.0; // the vector V2 will not be modified. |
33 | //! @endcode |
34 | //! |
35 | //! The Exception RangeError is raised when trying to access outside |
36 | //! the range of a vector : |
37 | //! @code |
38 | //! V1(11) = 0.0 // --> will raise RangeError; |
39 | //! @endcode |
40 | //! |
41 | //! The Exception DimensionError is raised when the dimensions of two |
42 | //! vectors are not compatible : |
43 | //! @code |
44 | //! math_Vector V3(1, 2); |
45 | //! V3 = V1; // --> will raise DimensionError; |
46 | //! V1.Add(V3) // --> will raise DimensionError; |
47 | //! @endcode |
1103eb60 |
48 | using math_Vector = math_VectorBase<double>; |
3b010a74 |
49 | |
50 | #endif |