@@ -109,74 +109,6 @@ from sage.structure.element cimport ModuleElement, Element
109109from sage.misc.cachefunc import cached_function
110110from sage.misc.superseded import deprecated_function_alias
111111
112- # *****************************************************************************
113- #
114- # Utility functions to test that something is a linear function / constraint
115- #
116- # *****************************************************************************
117-
118- cpdef is_LinearFunction(x):
119- """
120- Test whether ``x`` is a linear function.
121-
122- INPUT:
123-
124- - ``x`` -- anything
125-
126- OUTPUT: boolean
127-
128- EXAMPLES::
129-
130- sage: p = MixedIntegerLinearProgram()
131- sage: x = p.new_variable()
132- sage: from sage.numerical.linear_functions import is_LinearFunction
133- sage: is_LinearFunction(x[0] - 2*x[2])
134- doctest:warning...
135- DeprecationWarning: The function is_LinearFunction is deprecated;
136- use 'isinstance(..., LinearFunction)' instead.
137- See https://github.com/sagemath/sage/issues/38184 for details.
138- True
139- sage: is_LinearFunction('a string')
140- False
141- """
142- from sage.misc.superseded import deprecation_cython
143- deprecation_cython(38184 ,
144- " The function is_LinearFunction is deprecated; "
145- " use 'isinstance(..., LinearFunction)' instead." )
146- return isinstance (x, LinearFunction)
147-
148-
149- def is_LinearConstraint (x ):
150- """
151- Test whether ``x`` is a linear constraint.
152-
153- INPUT:
154-
155- - ``x`` -- anything
156-
157- OUTPUT: boolean
158-
159- EXAMPLES::
160-
161- sage: p = MixedIntegerLinearProgram()
162- sage: x = p.new_variable()
163- sage: ieq = (x[0] <= x[1])
164- sage: from sage.numerical.linear_functions import is_LinearConstraint
165- sage: is_LinearConstraint(ieq)
166- doctest:warning...
167- DeprecationWarning: The function is_LinearConstraint is deprecated;
168- use 'isinstance(..., LinearConstraint)' instead.
169- See https://github.com/sagemath/sage/issues/38184 for details.
170- True
171- sage: is_LinearConstraint('a string')
172- False
173- """
174- from sage.misc.superseded import deprecation_cython
175- deprecation_cython(38184 ,
176- " The function is_LinearConstraint is deprecated; "
177- " use 'isinstance(..., LinearConstraint)' instead." )
178- return isinstance (x, LinearConstraint)
179-
180112
181113# ****************************************************************************
182114#
0 commit comments