-
Notifications
You must be signed in to change notification settings - Fork 0
/
shell.start
95 lines (87 loc) · 2.95 KB
/
shell.start
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
import arb.functions.polynomials.orthogonal.real.Type1ChebyshevPolynomials;
import javafx.application.Platform;
import arb.functions.integer.RealPolynomialSequence;
import arb.functions.integer.RealFunctionSequence;
import arb.arblib;
import arb.functions.rational.ComplexRationalFunctionSequence;
import arb.Initializable;
import arb.IntegerConstants;
import arb.ComplexRationalFunction;
import arb.functions.rational.LommelPolynomial;
import arb.Fraction;
import arb.expressions.Context;
import arb.RationalFunction;
import arb.functions.rational.RationalFunctionSequence;
import arb.utensils.text.trees.TextTree;
import arb.utensils.text.trees.FileTreeModel;
import arb.utensils.text.trees.FileNode;
import java.io.File;
import javafx.application.Platform;
import arb.functions.Function;
import static arb.utensils.Utensils.*;
import static java.lang.System.out;
import java.util.function.IntFunction;
import java.util.stream.IntStream;
import java.util.stream.Collectors;
import java.util.List;
import arb.stochastic.processes.operators.*;
import arb.expressions.*;
import static java.lang.System.out;
import static java.lang.System.err;
import static arb.utensils.ShellFunctions.*;
import static arb.expressions.Expression.*;
import static arb.functions.real.RealFunction.*;
import static arb.RoundingMode.*;
import static arb.RealConstants.*;
import arb.documentation.*;
import arb.RealConstants;
import arb.ComplexConstants;
import arb.MagnitudeConstants;
import arb.Magnitude;
import arb.Real;
import arb.Integer;
import arb.RealPolynomial;
import arb.ComplexPolynomial;
import arb.Complex;
import arb.Float;
import arb.FloatInterval;
import arb.functions.complex.numbertheoretic.*;
import arb.functions.polynomials.*;
import arb.functions.polynomials.orthogonal.*;
import arb.functions.polynomials.orthogonal.real.*;
import arb.functions.real.*;
import java.util.ArrayList;
import java.lang.reflect.Array;
import java.util.Arrays;
public <A> List<A> seq(int m, int n,IntFunction<A> f) { return IntStream.rangeClosed(m,n).mapToObj(f).toList();};
@SuppressWarnings("unchecked")
public <A> A[] array( List<A> list, Class<A> type ) { return (A[])list.toArray((A[])Array.newInstance(type,list.size()));}
public List<Real> coeffs( List<RealPolynomial> s) { return s.stream().map(p->p.getCoeffs()).toList();};
public void matrix( List<RealPolynomial> s)
{
s.forEach( h->
{
h.getCoeffs().forEach( g -> g.printPrecision = false );
System.out.format("#%s=%s\n\n",h.getLength(),h.coeffs);
});
}
public RealPolynomial[] rarray( List<RealPolynomial> list )
{
return array( funcs, RealPolynomial.class);
}
public Integer[] iarray( List<Integer> list )
{
return array( list, Integer.class);
}
public RealFunction[] rfarray( List<RealFunction> funcs )
{
return array( funcs, RealFunction.class);
}
void ls(String path)
{
out.println(
new TextTree<FileNode>(
new FileTreeModel(
new File(
path.replaceAll("~",System.getProperty("user.home"))))));
}