1 /*
2 * Copyright (C) 1998, 2000-2007, 2010, 2011, 2012, 2013 SINTEF ICT,
3 * Applied Mathematics, Norway.
4 *
5 * Contact information: E-mail: tor.dokken@sintef.no
6 * SINTEF ICT, Department of Applied Mathematics,
7 * P.O. Box 124 Blindern,
8 * 0314 Oslo, Norway.
9 *
10 * This file is part of SISL.
11 *
12 * SISL is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Affero General Public License as
14 * published by the Free Software Foundation, either version 3 of the
15 * License, or (at your option) any later version.
16 *
17 * SISL is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU Affero General Public License for more details.
21 *
22 * You should have received a copy of the GNU Affero General Public
23 * License along with SISL. If not, see
24 * <http://www.gnu.org/licenses/>.
25 *
26 * In accordance with Section 7(b) of the GNU Affero General Public
27 * License, a covered work must retain the producer line in every data
28 * file that is created or manipulated using SISL.
29 *
30 * Other Usage
31 * You can be released from the requirements of the license by purchasing
32 * a commercial license. Buying such a license is mandatory as soon as you
33 * develop commercial activities involving the SISL library without
34 * disclosing the source code of your own applications.
35 *
36 * This file may be used in accordance with the terms contained in a
37 * written agreement between you and SINTEF ICT.
38 */
39
40 #include "sisl-copyright.h"
41
42 /*
43 *
44 * $Id: s1791.c,v 1.1 1994-04-21 12:10:42 boh Exp $
45 *
46 */
47
48
49 #define S1791
50
51 #include "sislP.h"
52
53 #if defined(SISLNEEDPROTOTYPES)
54 int
s1791(double et[],int ik,int in)55 s1791(double et[],int ik,int in)
56 #else
57 int s1791(et,ik,in)
58 double et[];
59 int ik;
60 int in;
61 #endif
62 /*
63 *********************************************************************
64 *
65 *********************************************************************
66 *
67 * PURPOSE : Test if it is possible to insert new internal nots
68 * any further.
69 *
70 *
71 *
72 * INPUT : et - The knot vector.
73 * ik - The order of the curve/surface.
74 * in - The number of the basic functions.
75 *
76 *
77 *
78 * OUTPUT : s1791 - Result of the test.
79 * = 0 : It is not possible to insert new knots
80 * any further.
81 * = 1 : It is possible to insert new knots.
82 *
83 *
84 * METHOD :
85 *
86 *
87 * REFERENCES :
88 *
89 *-
90 * CALLS :
91 *
92 * WRITTEN BY : Arne Laksaa, SI, 89-04.
93 *
94 *********************************************************************
95 */
96 {
97 register double tstart= et[ik - 1];
98 register double tend = et[in];
99 register double tmid = (tstart+tend)*(double)0.5;
100
101 /* Check if it is possible to divide the parameter interval. */
102
103 if (DEQUAL(tmid,tstart) || DEQUAL(tmid,tend))
104 return 0;
105 else
106 return 1;
107 }
108
109
110
111
112
113