1dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond/*
2dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * Licensed to the Apache Software Foundation (ASF) under one or more
3dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * contributor license agreements.  See the NOTICE file distributed with
4dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * this work for additional information regarding copyright ownership.
5dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * The ASF licenses this file to You under the Apache License, Version 2.0
6dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * (the "License"); you may not use this file except in compliance with
7dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * the License.  You may obtain a copy of the License at
8dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond *
9dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond *      http://www.apache.org/licenses/LICENSE-2.0
10dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond *
11dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * Unless required by applicable law or agreed to in writing, software
12dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * distributed under the License is distributed on an "AS IS" BASIS,
13dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * See the License for the specific language governing permissions and
15dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * limitations under the License.
16dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond */
17dee0849a9704d532af0b550146cbafbaa6ee1d19Raymondpackage org.apache.commons.math.linear;
18dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
19dee0849a9704d532af0b550146cbafbaa6ee1d19Raymondimport java.util.Iterator;
20dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
21dee0849a9704d532af0b550146cbafbaa6ee1d19Raymondimport org.apache.commons.math.FunctionEvaluationException;
22dee0849a9704d532af0b550146cbafbaa6ee1d19Raymondimport org.apache.commons.math.analysis.UnivariateRealFunction;
23dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
24dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
25dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond/**
26dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * Interface defining a real-valued vector with basic algebraic operations.
27dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * <p>
28dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * vector element indexing is 0-based -- e.g., <code>getEntry(0)</code>
29dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * returns the first element of the vector.
30dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * </p>
31dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * <p>
32dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * The various <code>mapXxx</code> and <code>mapXxxToSelf</code> methods operate
33dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * on vectors element-wise, i.e. they perform the same operation (adding a scalar,
34dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * applying a function ...) on each element in turn. The <code>mapXxx</code>
35dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * versions create a new vector to hold the result and do not change the instance.
36dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * The <code>mapXxxToSelf</code> versions use the instance itself to store the
37dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * results, so the instance is changed by these methods. In both cases, the result
38dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * vector is returned by the methods, this allows to use the <i>fluent API</i>
39dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * style, like this:
40dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * </p>
41dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * <pre>
42dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond *   RealVector result = v.mapAddToSelf(3.0).mapTanToSelf().mapSquareToSelf();
43dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * </pre>
44dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * <p>
45dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond *  Remark on the deprecated {@code mapXxx} and {@code mapXxxToSelf} methods: In
46dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond *  Commons-Math v3.0, the same functionality will be achieved by directly using the
47dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond *  {@link #map(UnivariateRealFunction)} and {@link #mapToSelf(UnivariateRealFunction)}
48dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond *  together with new function objects (not available in v2.2).
49dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * </p>
50dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond *
51dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * @version $Revision: 1070725 $ $Date: 2011-02-15 02:31:12 +0100 (mar. 15 févr. 2011) $
52dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond * @since 2.0
53dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond */
54dee0849a9704d532af0b550146cbafbaa6ee1d19Raymondpublic interface RealVector {
55dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
56dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Acts as if it is implemented as:
57dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * <pre>
58dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     *  Entry e = null;
59dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     *  for(Iterator<Entry> it = iterator(); it.hasNext(); e = it.next()) {
60dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     *      e.setValue(function.value(e.getValue()));
61dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     *  }
62dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * </pre>
63dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     *
64dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @param function Function to apply to each entry.
65dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return this vector.
66dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @throws FunctionEvaluationException if the function throws it.
67dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
68dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapToSelf(UnivariateRealFunction function) throws FunctionEvaluationException;
69dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
70dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
71dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Acts as if implemented as:
72dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * <pre>
73dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     *  return copy().map(function);
74dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * </pre>
75dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     *
76dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @param function Function to apply to each entry.
77dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return a new vector.
78dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @throws FunctionEvaluationException if the function throws it.
79dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
80dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector map(UnivariateRealFunction function) throws FunctionEvaluationException;
81dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
82dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /** Class representing a modifiable entry in the vector. */
83dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    public abstract class Entry {
84dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond        /** Index of the entry. */
85dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond        private int index;
86dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
87dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond        /**
88dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond         * Get the value of the entry.
89dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond         *
90dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond         * @return the value of the entry.
91dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond         */
92dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond        public abstract double getValue();
93dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond        /**
94dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond         * Set the value of the entry.
95dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond         *
96dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond         * @param value New value for the entry.
97dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond         */
98dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond        public abstract void setValue(double value);
99dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond        /**
100dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond         * Get the index of the entry.
101dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond         *
102dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond         * @return the index of the entry.
103dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond         */
104dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond        public int getIndex() {
105dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond            return index;
106dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond        }
107dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond        /**
108dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond         * Set the index of the entry.
109dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond         *
110dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond         * @param index New index for the entry.
111dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond         */
112dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond        public void setIndex(int index) {
113dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond            this.index = index;
114dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond        }
115dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    }
116dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
117dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
118dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Generic dense iterator.
119dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * It iterates in increasing order of the vector index.
120dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     *
121dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return a dense iterator
122dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
123dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    Iterator<Entry> iterator();
124dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
125dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
126dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Specialized implementations may choose to not iterate over all
127dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * dimensions, either because those values are unset, or are equal
128dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * to defaultValue(), or are small enough to be ignored for the
129dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * purposes of iteration.
130dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * No guarantees are made about order of iteration.
131dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * In dense implementations, this method will often delegate to
132dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * {@link #iterator()}.
133dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     *
134dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return a sparse iterator
135dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
136dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    Iterator<Entry> sparseIterator();
137dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
138dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
139dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Returns a (deep) copy of this vector.
140dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     *
141dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return a vector copy.
142dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
143dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector copy();
144dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
145dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
146dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Compute the sum of this vector and {@code v}.
147dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     *
148dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @param v Vector to be added.
149dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return {@code this} + {@code v}.
150dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @throws org.apache.commons.math.exception.DimensionMismatchException
151dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * if {@code v} is not the same size as this vector.
152dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
153dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector add(RealVector v);
154dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
155dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
156dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Compute the sum of this vector and {@code v}.
157dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     *
158dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @param v Vector to be added.
159dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return {@code this} + {@code v}.
160dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @throws org.apache.commons.math.exception.DimensionMismatchException
161dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * if {@code v} is not the same size as this vector.
162dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
163dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector add(double[] v);
164dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
165dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
166dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
167dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Subtract {@code v} from this vector.
168dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     *
169dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @param v Vector to be subtracted.
170dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return {@code this} - {@code v}.
171dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @throws org.apache.commons.math.exception.DimensionMismatchException
172dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * if {@code v} is not the same size as this vector.
173dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
174dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector subtract(RealVector v);
175dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
176dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
177dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Subtract {@code v} from this vector.
178dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     *
179dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @param v Vector to be subtracted.
180dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return {@code this} - {@code v}.
181dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @throws org.apache.commons.math.exception.DimensionMismatchException
182dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * if {@code v} is not the same size as this vector.
183dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
184dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector subtract(double[] v);
185dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
186dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
187dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Add a value to each entry.
188dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     *
189dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @param d Value to be added to each entry.
190dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return {@code this} + {@code d}.
191dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
192dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapAdd(double d);
193dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
194dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
195dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Add a value to each entry.
196dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * The instance is changed in-place.
197dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     *
198dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @param d Value to be added to each entry.
199dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return {@code this}.
200dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
201dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapAddToSelf(double d);
202dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
203dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
204dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Subtract a value from each entry.
205dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     *
206dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @param d Value to be subtracted.
207dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return {@code this} - {@code d}.
208dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
209dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapSubtract(double d);
210dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
211dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
212dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Subtract a value from each entry.
213dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * The instance is changed in-place.
214dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     *
215dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @param d Value to be subtracted.
216dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return {@code this}.
217dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
218dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapSubtractToSelf(double d);
219dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
220dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
221dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Multiply each entry.
222dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     *
223dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @param d Multiplication factor.
224dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return {@code this} * {@code d}.
225dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
226dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapMultiply(double d);
227dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
228dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
229dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Multiply each entry.
230dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * The instance is changed in-place.
231dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     *
232dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @param d Multiplication factor.
233dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return {@code this}.
234dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
235dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapMultiplyToSelf(double d);
236dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
237dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
238dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Divide each entry.
239dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     *
240dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @param d Value to divide by.
241dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return {@code this} / {@code d}.
242dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
243dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapDivide(double d);
244dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
245dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
246dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Divide each entry.
247dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * The instance is changed in-place.
248dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     *
249dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @param d Value to divide by.
250dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return {@code this}.
251dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
252dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapDivideToSelf(double d);
253dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
254dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
255dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Map a power operation to each entry.
256dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     *
257dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @param d Operator value.
258dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return a mapped copy of the vector.
259dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @deprecated in 2.2 (to be removed in 3.0).
260dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
261dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    @Deprecated
262dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapPow(double d);
263dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
264dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
265dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Map a power operation to each entry.
266dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * The instance is changed in-place.
267dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     *
268dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @param d Operator value.
269dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return the mapped vector.
270dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @deprecated in 2.2 (to be removed in 3.0).
271dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
272dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    @Deprecated
273dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapPowToSelf(double d);
274dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
275dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
276dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Map the {@link Math#exp(double)} function to each entry.
277dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     *
278dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return a mapped copy of the vector.
279dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @deprecated in 2.2 (to be removed in 3.0).
280dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
281dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    @Deprecated
282dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapExp();
283dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
284dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
285dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Map {@link Math#exp(double)} operation to each entry.
286dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * The instance is changed in-place.
287dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     *
288dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return the mapped vector.
289dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @deprecated in 2.2 (to be removed in 3.0).
290dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
291dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    @Deprecated
292dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapExpToSelf();
293dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
294dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
295dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Map the {@link Math#expm1(double)} function to each entry.
296dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return a vector containing the result of applying the function to each entry
297dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @deprecated in 2.2 (to be removed in 3.0).
298dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
299dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    @Deprecated
300dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapExpm1();
301dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
302dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
303dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Map the {@link Math#expm1(double)} function to each entry.
304dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * <p>The instance <strong>is</strong> changed by this method.</p>
305dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return for convenience, return this
306dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @deprecated in 2.2 (to be removed in 3.0).
307dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
308dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    @Deprecated
309dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapExpm1ToSelf();
310dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
311dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
312dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Map the {@link Math#log(double)} function to each entry.
313dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return a vector containing the result of applying the function to each entry
314dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @deprecated in 2.2 (to be removed in 3.0).
315dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
316dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    @Deprecated
317dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapLog();
318dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
319dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
320dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Map the {@link Math#log(double)} function to each entry.
321dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * <p>The instance <strong>is</strong> changed by this method.</p>
322dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return for convenience, return this
323dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @deprecated in 2.2 (to be removed in 3.0).
324dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
325dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    @Deprecated
326dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapLogToSelf();
327dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
328dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
329dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Map the {@link Math#log10(double)} function to each entry.
330dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return a vector containing the result of applying the function to each entry
331dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @deprecated in 2.2 (to be removed in 3.0).
332dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
333dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    @Deprecated
334dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapLog10();
335dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
336dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
337dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Map the {@link Math#log10(double)} function to each entry.
338dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * <p>The instance <strong>is</strong> changed by this method.</p>
339dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return for convenience, return this
340dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @deprecated in 2.2 (to be removed in 3.0).
341dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
342dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    @Deprecated
343dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapLog10ToSelf();
344dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
345dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
346dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Map the {@link Math#log1p(double)} function to each entry.
347dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return a vector containing the result of applying the function to each entry
348dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @deprecated in 2.2 (to be removed in 3.0).
349dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
350dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    @Deprecated
351dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapLog1p();
352dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
353dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
354dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Map the {@link Math#log1p(double)} function to each entry.
355dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * <p>The instance <strong>is</strong> changed by this method.</p>
356dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return for convenience, return this
357dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @deprecated in 2.2 (to be removed in 3.0).
358dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
359dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    @Deprecated
360dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapLog1pToSelf();
361dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
362dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
363dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Map the {@link Math#cosh(double)} function to each entry.
364dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return a vector containing the result of applying the function to each entry
365dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @deprecated in 2.2 (to be removed in 3.0).
366dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
367dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    @Deprecated
368dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapCosh();
369dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
370dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
371dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Map the {@link Math#cosh(double)} function to each entry.
372dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * <p>The instance <strong>is</strong> changed by this method.</p>
373dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return for convenience, return this
374dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @deprecated in 2.2 (to be removed in 3.0).
375dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
376dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    @Deprecated
377dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapCoshToSelf();
378dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
379dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
380dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Map the {@link Math#sinh(double)} function to each entry.
381dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return a vector containing the result of applying the function to each entry
382dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @deprecated in 2.2 (to be removed in 3.0).
383dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
384dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    @Deprecated
385dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapSinh();
386dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
387dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
388dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Map the {@link Math#sinh(double)} function to each entry.
389dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * <p>The instance <strong>is</strong> changed by this method.</p>
390dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return for convenience, return this
391dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @deprecated in 2.2 (to be removed in 3.0).
392dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
393dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    @Deprecated
394dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapSinhToSelf();
395dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
396dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
397dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Map the {@link Math#tanh(double)} function to each entry.
398dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return a vector containing the result of applying the function to each entry
399dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @deprecated in 2.2 (to be removed in 3.0).
400dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
401dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    @Deprecated
402dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapTanh();
403dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
404dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
405dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Map the {@link Math#tanh(double)} function to each entry.
406dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * <p>The instance <strong>is</strong> changed by this method.</p>
407dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return for convenience, return this
408dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @deprecated in 2.2 (to be removed in 3.0).
409dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
410dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    @Deprecated
411dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapTanhToSelf();
412dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
413dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
414dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Map the {@link Math#cos(double)} function to each entry.
415dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return a vector containing the result of applying the function to each entry
416dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @deprecated in 2.2 (to be removed in 3.0).
417dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
418dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    @Deprecated
419dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapCos();
420dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
421dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
422dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Map the {@link Math#cos(double)} function to each entry.
423dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * <p>The instance <strong>is</strong> changed by this method.</p>
424dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return for convenience, return this
425dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @deprecated in 2.2 (to be removed in 3.0).
426dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
427dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    @Deprecated
428dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapCosToSelf();
429dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
430dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
431dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Map the {@link Math#sin(double)} function to each entry.
432dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return a vector containing the result of applying the function to each entry
433dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @deprecated in 2.2 (to be removed in 3.0).
434dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
435dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    @Deprecated
436dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapSin();
437dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
438dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
439dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Map the {@link Math#sin(double)} function to each entry.
440dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * <p>The instance <strong>is</strong> changed by this method.</p>
441dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return for convenience, return this
442dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @deprecated in 2.2 (to be removed in 3.0).
443dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
444dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    @Deprecated
445dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapSinToSelf();
446dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
447dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
448dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Map the {@link Math#tan(double)} function to each entry.
449dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return a vector containing the result of applying the function to each entry
450dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @deprecated in 2.2 (to be removed in 3.0).
451dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
452dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    @Deprecated
453dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapTan();
454dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
455dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
456dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Map the {@link Math#tan(double)} function to each entry.
457dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * <p>The instance <strong>is</strong> changed by this method.</p>
458dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return for convenience, return this
459dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @deprecated in 2.2 (to be removed in 3.0).
460dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
461dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    @Deprecated
462dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapTanToSelf();
463dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
464dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
465dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Map the {@link Math#acos(double)} function to each entry.
466dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return a vector containing the result of applying the function to each entry
467dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @deprecated in 2.2 (to be removed in 3.0).
468dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
469dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    @Deprecated
470dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapAcos();
471dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
472dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
473dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Map the {@link Math#acos(double)} function to each entry.
474dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * <p>The instance <strong>is</strong> changed by this method.</p>
475dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return for convenience, return this
476dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @deprecated in 2.2 (to be removed in 3.0).
477dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
478dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    @Deprecated
479dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapAcosToSelf();
480dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
481dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
482dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Map the {@link Math#asin(double)} function to each entry.
483dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return a vector containing the result of applying the function to each entry
484dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @deprecated in 2.2 (to be removed in 3.0).
485dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
486dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    @Deprecated
487dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapAsin();
488dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
489dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
490dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Map the {@link Math#asin(double)} function to each entry.
491dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * <p>The instance <strong>is</strong> changed by this method.</p>
492dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return for convenience, return this
493dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @deprecated in 2.2 (to be removed in 3.0).
494dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
495dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    @Deprecated
496dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapAsinToSelf();
497dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
498dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
499dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Map the {@link Math#atan(double)} function to each entry.
500dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return a vector containing the result of applying the function to each entry
501dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @deprecated in 2.2 (to be removed in 3.0).
502dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
503dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    @Deprecated
504dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapAtan();
505dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
506dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
507dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Map the {@link Math#atan(double)} function to each entry.
508dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * <p>The instance <strong>is</strong> changed by this method.</p>
509dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return for convenience, return this
510dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @deprecated in 2.2 (to be removed in 3.0).
511dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
512dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    @Deprecated
513dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapAtanToSelf();
514dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
515dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
516dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Map the 1/x function to each entry.
517dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return a vector containing the result of applying the function to each entry
518dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @deprecated in 2.2 (to be removed in 3.0).
519dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
520dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    @Deprecated
521dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapInv();
522dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
523dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
524dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Map the 1/x function to each entry.
525dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * <p>The instance <strong>is</strong> changed by this method.</p>
526dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return for convenience, return this
527dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @deprecated in 2.2 (to be removed in 3.0).
528dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
529dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    @Deprecated
530dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapInvToSelf();
531dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
532dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
533dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Map the {@link Math#abs(double)} function to each entry.
534dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return a vector containing the result of applying the function to each entry
535dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @deprecated in 2.2 (to be removed in 3.0).
536dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
537dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    @Deprecated
538dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapAbs();
539dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
540dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
541dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Map the {@link Math#abs(double)} function to each entry.
542dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * <p>The instance <strong>is</strong> changed by this method.</p>
543dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return for convenience, return this
544dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @deprecated in 2.2 (to be removed in 3.0).
545dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
546dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    @Deprecated
547dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapAbsToSelf();
548dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
549dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
550dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Map the {@link Math#sqrt(double)} function to each entry.
551dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return a vector containing the result of applying the function to each entry
552dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @deprecated in 2.2 (to be removed in 3.0).
553dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
554dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    @Deprecated
555dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapSqrt();
556dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
557dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
558dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Map the {@link Math#sqrt(double)} function to each entry.
559dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * <p>The instance <strong>is</strong> changed by this method.</p>
560dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return for convenience, return this
561dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @deprecated in 2.2 (to be removed in 3.0).
562dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
563dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    @Deprecated
564dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapSqrtToSelf();
565dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
566dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
567dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Map the {@link Math#cbrt(double)} function to each entry.
568dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return a vector containing the result of applying the function to each entry
569dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @deprecated in 2.2 (to be removed in 3.0).
570dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
571dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    @Deprecated
572dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapCbrt();
573dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
574dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
575dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Map the {@link Math#cbrt(double)} function to each entry.
576dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * <p>The instance <strong>is</strong> changed by this method.</p>
577dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return for convenience, return this
578dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @deprecated in 2.2 (to be removed in 3.0).
579dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
580dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    @Deprecated
581dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapCbrtToSelf();
582dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
583dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
584dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Map the {@link Math#ceil(double)} function to each entry.
585dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return a vector containing the result of applying the function to each entry
586dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @deprecated in 2.2 (to be removed in 3.0).
587dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
588dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    @Deprecated
589dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapCeil();
590dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
591dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
592dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Map the {@link Math#ceil(double)} function to each entry.
593dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * <p>The instance <strong>is</strong> changed by this method.</p>
594dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return for convenience, return this
595dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @deprecated in 2.2 (to be removed in 3.0).
596dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
597dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    @Deprecated
598dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapCeilToSelf();
599dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
600dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
601dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Map the {@link Math#floor(double)} function to each entry.
602dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return a vector containing the result of applying the function to each entry
603dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @deprecated in 2.2 (to be removed in 3.0).
604dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
605dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    @Deprecated
606dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapFloor();
607dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
608dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
609dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Map the {@link Math#floor(double)} function to each entry.
610dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * <p>The instance <strong>is</strong> changed by this method.</p>
611dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return for convenience, return this
612dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @deprecated in 2.2 (to be removed in 3.0).
613dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
614dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    @Deprecated
615dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapFloorToSelf();
616dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
617dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
618dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Map the {@link Math#rint(double)} function to each entry.
619dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return a vector containing the result of applying the function to each entry
620dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @deprecated in 2.2 (to be removed in 3.0).
621dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
622dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    @Deprecated
623dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapRint();
624dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
625dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
626dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Map the {@link Math#rint(double)} function to each entry.
627dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * <p>The instance <strong>is</strong> changed by this method.</p>
628dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return for convenience, return this
629dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @deprecated in 2.2 (to be removed in 3.0).
630dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
631dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    @Deprecated
632dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapRintToSelf();
633dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
634dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
635dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Map the {@link Math#signum(double)} function to each entry.
636dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return a vector containing the result of applying the function to each entry
637dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @deprecated in 2.2 (to be removed in 3.0).
638dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
639dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    @Deprecated
640dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapSignum();
641dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
642dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
643dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Map the {@link Math#signum(double)} function to each entry.
644dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * <p>The instance <strong>is</strong> changed by this method.</p>
645dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return for convenience, return this
646dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @deprecated in 2.2 (to be removed in 3.0).
647dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
648dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    @Deprecated
649dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapSignumToSelf();
650dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
651dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
652dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Map the {@link Math#ulp(double)} function to each entry.
653dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return a vector containing the result of applying the function to each entry
654dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @deprecated in 2.2 (to be removed in 3.0).
655dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
656dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    @Deprecated
657dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapUlp();
658dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
659dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
660dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Map the {@link Math#ulp(double)} function to each entry.
661dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * <p>The instance <strong>is</strong> changed by this method.</p>
662dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return for convenience, return this
663dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @deprecated in 2.2 (to be removed in 3.0).
664dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
665dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    @Deprecated
666dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector mapUlpToSelf();
667dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
668dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
669dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Element-by-element multiplication.
670dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @param v vector by which instance elements must be multiplied
671dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return a vector containing this[i] * v[i] for all i
672dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @throws org.apache.commons.math.exception.DimensionMismatchException
673dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * if {@code v} is not the same size as this vector.
674dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
675dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector ebeMultiply(RealVector v);
676dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
677dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
678dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Element-by-element multiplication.
679dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @param v vector by which instance elements must be multiplied
680dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return a vector containing this[i] * v[i] for all i
681dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @throws org.apache.commons.math.exception.DimensionMismatchException
682dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * if {@code v} is not the same size as this vector.
683dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
684dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector ebeMultiply(double[] v);
685dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
686dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
687dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Element-by-element division.
688dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @param v vector by which instance elements must be divided
689dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return a vector containing this[i] / v[i] for all i
690dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @throws org.apache.commons.math.exception.DimensionMismatchException
691dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * if {@code v} is not the same size as this vector.
692dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
693dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector ebeDivide(RealVector v);
694dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
695dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
696dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Element-by-element division.
697dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @param v vector by which instance elements must be divided
698dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return a vector containing this[i] / v[i] for all i
699dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @throws org.apache.commons.math.exception.DimensionMismatchException
700dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * if {@code v} is not the same size as this vector.
701dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
702dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector ebeDivide(double[] v);
703dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
704dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
705dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Returns vector entries as a double array.
706dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return double array of entries
707dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
708dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     double[] getData();
709dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
710dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
711dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Compute the dot product.
712dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @param v vector with which dot product should be computed
713dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return the scalar dot product between instance and v
714dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @throws org.apache.commons.math.exception.DimensionMismatchException
715dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * if {@code v} is not the same size as this vector.
716dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
717dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    double dotProduct(RealVector v);
718dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
719dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
720dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Compute the dot product.
721dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @param v vector with which dot product should be computed
722dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return the scalar dot product between instance and v
723dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @throws org.apache.commons.math.exception.DimensionMismatchException
724dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * if {@code v} is not the same size as this vector.
725dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
726dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    double dotProduct(double[] v);
727dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
728dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
729dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Returns the L<sub>2</sub> norm of the vector.
730dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * <p>The L<sub>2</sub> norm is the root of the sum of
731dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * the squared elements.</p>
732dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return norm
733dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @see #getL1Norm()
734dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @see #getLInfNorm()
735dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @see #getDistance(RealVector)
736dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
737dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    double getNorm();
738dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
739dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
740dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Returns the L<sub>1</sub> norm of the vector.
741dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * <p>The L<sub>1</sub> norm is the sum of the absolute
742dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * values of elements.</p>
743dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return norm
744dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @see #getNorm()
745dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @see #getLInfNorm()
746dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @see #getL1Distance(RealVector)
747dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
748dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    double getL1Norm();
749dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
750dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
751dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Returns the L<sub>&infin;</sub> norm of the vector.
752dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * <p>The L<sub>&infin;</sub> norm is the max of the absolute
753dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * values of elements.</p>
754dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return norm
755dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @see #getNorm()
756dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @see #getL1Norm()
757dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @see #getLInfDistance(RealVector)
758dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
759dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    double getLInfNorm();
760dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
761dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
762dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Distance between two vectors.
763dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * <p>This method computes the distance consistent with the
764dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * L<sub>2</sub> norm, i.e. the square root of the sum of
765dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * elements differences, or euclidian distance.</p>
766dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @param v vector to which distance is requested
767dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return distance between two vectors.
768dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @throws org.apache.commons.math.exception.DimensionMismatchException
769dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * if {@code v} is not the same size as this vector.
770dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @see #getL1Distance(RealVector)
771dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @see #getLInfDistance(RealVector)
772dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @see #getNorm()
773dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
774dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    double getDistance(RealVector v);
775dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
776dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
777dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Distance between two vectors.
778dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * <p>This method computes the distance consistent with the
779dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * L<sub>2</sub> norm, i.e. the square root of the sum of
780dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * elements differences, or euclidian distance.</p>
781dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @param v vector to which distance is requested
782dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return distance between two vectors.
783dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @throws org.apache.commons.math.exception.DimensionMismatchException
784dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * if {@code v} is not the same size as this vector.
785dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @see #getL1Distance(double[])
786dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @see #getLInfDistance(double[])
787dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @see #getNorm()
788dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
789dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    double getDistance(double[] v);
790dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
791dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
792dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Distance between two vectors.
793dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * <p>This method computes the distance consistent with
794dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * L<sub>1</sub> norm, i.e. the sum of the absolute values of
795dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * elements differences.</p>
796dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @param v vector to which distance is requested
797dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return distance between two vectors.
798dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @throws org.apache.commons.math.exception.DimensionMismatchException
799dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * if {@code v} is not the same size as this vector.
800dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @see #getDistance(RealVector)
801dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @see #getLInfDistance(RealVector)
802dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @see #getL1Norm()
803dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
804dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    double getL1Distance(RealVector v);
805dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
806dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
807dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Distance between two vectors.
808dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * <p>This method computes the distance consistent with
809dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * L<sub>1</sub> norm, i.e. the sum of the absolute values of
810dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * elements differences.</p>
811dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @param v vector to which distance is requested
812dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return distance between two vectors.
813dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @throws org.apache.commons.math.exception.DimensionMismatchException
814dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * if {@code v} is not the same size as this vector.
815dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @see #getDistance(double[])
816dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @see #getLInfDistance(double[])
817dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @see #getL1Norm()
818dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
819dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    double getL1Distance(double[] v);
820dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
821dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
822dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Distance between two vectors.
823dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * <p>This method computes the distance consistent with
824dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * L<sub>&infin;</sub> norm, i.e. the max of the absolute values of
825dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * elements differences.</p>
826dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @param v vector to which distance is requested
827dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return distance between two vectors.
828dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @throws org.apache.commons.math.exception.DimensionMismatchException
829dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * if {@code v} is not the same size as this vector.
830dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @see #getDistance(RealVector)
831dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @see #getL1Distance(RealVector)
832dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @see #getLInfNorm()
833dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
834dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    double getLInfDistance(RealVector v);
835dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
836dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
837dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Distance between two vectors.
838dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * <p>This method computes the distance consistent with
839dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * L<sub>&infin;</sub> norm, i.e. the max of the absolute values of
840dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * elements differences.</p>
841dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @param v vector to which distance is requested
842dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return distance between two vectors.
843dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @throws org.apache.commons.math.exception.DimensionMismatchException
844dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * if {@code v} is not the same size as this vector.
845dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @see #getDistance(double[])
846dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @see #getL1Distance(double[])
847dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @see #getLInfNorm()
848dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
849dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    double getLInfDistance(double[] v);
850dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
851dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /** Creates a unit vector pointing in the direction of this vector.
852dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * <p>The instance is not changed by this method.</p>
853dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return a unit vector pointing in direction of this vector
854dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @exception ArithmeticException if the norm is null
855dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
856dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector unitVector();
857dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
858dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /** Converts this vector into a unit vector.
859dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * <p>The instance itself is changed by this method.</p>
860dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @throws ArithmeticException
861dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * if the norm is zero.
862dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
863dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    void unitize();
864dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
865dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /** Find the orthogonal projection of this vector onto another vector.
866dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @param v vector onto which instance must be projected
867dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return projection of the instance onto v
868dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @throws org.apache.commons.math.exception.DimensionMismatchException
869dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * if {@code v} is not the same size as this vector.
870dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
871dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector projection(RealVector v);
872dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
873dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /** Find the orthogonal projection of this vector onto another vector.
874dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @param v vector onto which instance must be projected
875dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return projection of the instance onto v
876dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @throws org.apache.commons.math.exception.DimensionMismatchException
877dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * if {@code v} is not the same size as this vector.
878dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
879dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector projection(double[] v);
880dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
881dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
882dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Compute the outer product.
883dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @param v vector with which outer product should be computed
884dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return the square matrix outer product between instance and v
885dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @throws org.apache.commons.math.exception.DimensionMismatchException
886dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * if {@code v} is not the same size as this vector.
887dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
888dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealMatrix outerProduct(RealVector v);
889dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
890dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
891dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Compute the outer product.
892dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @param v vector with which outer product should be computed
893dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return the square matrix outer product between instance and v
894dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @throws org.apache.commons.math.exception.DimensionMismatchException
895dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * if {@code v} is not the same size as this vector.
896dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
897dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealMatrix outerProduct(double[] v);
898dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
899dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
900dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Returns the entry in the specified index.
901dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     *
902dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @param index Index location of entry to be fetched.
903dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return the vector entry at {@code index}.
904dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @throws org.apache.commons.math.exception.OutOfRangeException
905dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * if the index is not valid.
906dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @see #setEntry(int, double)
907dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
908dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    double getEntry(int index);
909dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
910dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
911dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Set a single element.
912dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @param index element index.
913dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @param value new value for the element.
914dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @throws org.apache.commons.math.exception.OutOfRangeException
915dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * if the index is not valid.
916dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @see #getEntry(int)
917dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
918dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    void setEntry(int index, double value);
919dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
920dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
921dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Returns the size of the vector.
922dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return size
923dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
924dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    int getDimension();
925dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
926dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
927dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Construct a vector by appending a vector to this vector.
928dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @param v vector to append to this one.
929dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return a new vector
930dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
931dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector append(RealVector v);
932dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
933dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
934dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Construct a vector by appending a double to this vector.
935dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @param d double to append.
936dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return a new vector
937dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
938dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector append(double d);
939dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
940dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
941dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Construct a vector by appending a double array to this vector.
942dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @param a double array to append.
943dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return a new vector
944dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
945dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector append(double[] a);
946dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
947dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
948dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Get a subvector from consecutive elements.
949dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @param index index of first element.
950dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @param n number of elements to be retrieved.
951dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return a vector containing n elements.
952dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @throws org.apache.commons.math.exception.OutOfRangeException
953dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * if the index is not valid.
954dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
955dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    RealVector getSubVector(int index, int n);
956dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
957dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
958dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Set a set of consecutive elements.
959dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @param index index of first element to be set.
960dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @param v vector containing the values to set.
961dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @throws org.apache.commons.math.exception.OutOfRangeException
962dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * if the index is not valid.
963dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @see #setSubVector(int, double[])
964dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
965dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    void setSubVector(int index, RealVector v);
966dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
967dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
968dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Set a set of consecutive elements.
969dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @param index index of first element to be set.
970dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @param v vector containing the values to set.
971dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @throws org.apache.commons.math.exception.OutOfRangeException
972dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * if the index is not valid.
973dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @see #setSubVector(int, RealVector)
974dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
975dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    void setSubVector(int index, double[] v);
976dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
977dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
978dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Set all elements to a single value.
979dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @param value single value to set for all elements
980dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
981dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    void set(double value);
982dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
983dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
984dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Convert the vector to a double array.
985dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * <p>The array is independent from vector data, it's elements
986dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * are copied.</p>
987dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return array containing a copy of vector elements
988dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
989dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    double[] toArray();
990dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
991dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
992dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Check whether any coordinate of this vector is {@code NaN}.
993dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return {@code true} if any coordinate of this vector is {@code NaN},
994dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * {@code false} otherwise.
995dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
996dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    boolean isNaN();
997dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond
998dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    /**
999dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * Check whether any coordinate of this vector is infinite and none are {@code NaN}.
1000dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     *
1001dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * @return {@code true} if any coordinate of this vector is infinite and
1002dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     * none are {@code NaN}, {@code false} otherwise.
1003dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond     */
1004dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond    boolean isInfinite();
1005dee0849a9704d532af0b550146cbafbaa6ee1d19Raymond}
1006