Skip to content

Commit 4e22a77

Browse files
Remove more Java crap ...
1 parent 87d53f4 commit 4e22a77

File tree

6 files changed

+19
-70
lines changed

6 files changed

+19
-70
lines changed

DataMining.tex

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -906,17 +906,14 @@ \section{Covariance clusters}
906906
adapts itself to the shape of each cluster. As the algorithm
907907
progresses the metric changes dynamically.
908908

909-
\subsection{Covariance clusters --- General implementation}
910909
\marginpar{Figure \ref{fig:dataminingclasses} with the boxes {\bf
911910
CovarianceCluster} grayed.} Covariance clusters need little
912911
implementation. All tasks are delegated to a Mahalanobis center
913912
described in section \ref{sec:mahalanobis}. Listing
914-
\ref{ls:mahacluster} shows the Smalltalk implementation and the
915-
Java implementation is shown in listing \ref{lj:mahacluster}.
913+
\ref{ls:mahacluster} shows the Smalltalk implementation.
916914

917915
\begin{listing} Smalltalk covariance cluster \label{ls:mahacluster}
918916
\input{Smalltalk/DataMining/DhbCovarianceCluster}
919917
\end{listing}
920918

921-
922919
\ifx\wholebook\relax\else\end{document}\fi

Estimation.tex

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -594,15 +594,7 @@ \subsection{Weighted point implementation}
594594
the end of the name for Smalltalk --- implements the computation
595595
of one term of the sum in equation \ref{eq:defchitest}. The
596596
argument of the method is any object implementing the behavior of
597-
a one-variable function defined in section \ref{sec:function}. In
598-
Java one can use the same method name to define a similar method
599-
to compute the terms of the sum of equation
600-
\ref{eq:defchitestcmp}: in this case, the argument of the method
601-
is another weighted point. This is not possible in Smalltalk,
602-
which cannot distinguish the types of the arguments. Thus, for
603-
Smalltalk the second method must have a different name: {\tt
604-
chi2ComparisonContribution:}. Here Java marks a point over
605-
Smalltalk.
597+
a one-variable function defined in section \ref{sec:function}.
606598

607599
Creating instances of the classes can be done in many ways. The
608600
fundamental method takes as arguments $x_i$, $y_i$ and the weight

FloatingPointSimulation.tex

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
\begin{document}
77
\fi
88

9-
10-
119
\chapter{Decimal floating-point simulation}
1210
\label{ch-fpSimul} The class {\tt DhbDecimalFloatingNumber} is
1311
intended to demonstrate rounding problems with floating-point
@@ -21,11 +19,6 @@ \chapter{Decimal floating-point simulation}
2119
it is this model can be used to illustrate rounding problems to
2220
beginners. This class is only intended for didactical purposes.
2321

24-
Only the Smalltalk implementation is given here, as Java does not
25-
lend itself to operator overloading. Moreover, fraction arithmetic
26-
is not available in Java. Thus, making an equivalent class would
27-
require much more code.
28-
2922
Instances of the class are created with the method {\tt new:}
3023
supplying any number as argument. For example, $${\tt
3124
DhbDecimalFloatingNumber new: 3.141592653589793238462643}$$

LinearAlgebra.tex

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -960,7 +960,7 @@ \subsection{LUP decomposition --- General implementation}
960960
\end{description}
961961

962962
The instance variable {\tt permutation} is set to undefined ({\tt
963-
nil} in Smalltlak, {\tt null} in Java) at initialization time by
963+
nil} in Smalltalk) at initialization time by
964964
default. It is used to check whether the decomposition has already
965965
been made or not.
966966

@@ -1075,7 +1075,6 @@ \section{Computing the determinant of a matrix}
10751075
the determinant is needed . The initial parity is 1. Each
10761076
additional permutation of the rows multiplies the parity by -1.
10771077

1078-
\subsection{Computing the determinant of matrix --- General implementation}
10791078
Our implementation uses the fact that objects of the class {\tt
10801079
Matrix} have an instance variable in which the LUP decomposition
10811080
is kept. This variable is initialized using lazy initialization:
@@ -1090,7 +1089,6 @@ \subsection{Computing the determinant of matrix --- General implementation}
10901089
product by the parity of the permutation to obtain the final
10911090
result.
10921091

1093-
\subsection{Computing the determinant of matrix implementation}
10941092
Listing \ref{ls:determinant} shows the methods of classes {\tt
10951093
DhbMatrix} and {\tt DhbLUPDecomposition} needed to compute a
10961094
matrix determinant.
@@ -1100,14 +1098,6 @@ \subsection{Computing the determinant of matrix implementation}
11001098
\input{Smalltalk/LinearAlgebra/DhbLUPDecomposition(DhbMatrixDeterminant)}
11011099
\end{listing}
11021100

1103-
1104-
\subsection{Computing the determinant of matrix --- Java implementation}
1105-
The code computing the determinant of a matrix consists of the
1106-
method {\tt determinant} of the class {\tt Matrix} (\cf listing
1107-
\ref{ls:matrix}) and the method {\tt determinant} of the class
1108-
{\tt LUPDecomposition} (\cf listing \ref{lj:lup}).
1109-
1110-
11111101
\section{Matrix inversion}
11121102
\label{sec:matrixinversion} The inverse of a square matrix ${\bf
11131103
A}$ is denoted ${\bf A}^{-1}$. It is defined by the following

Series.tex

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -47,42 +47,20 @@ \section{Introduction}
4747
functions, which are very important to compute probabilities: the
4848
incomplete gamma function and the incomplete beta function.
4949

50-
For illustrative purposes, the implementation in Smalltalk is
51-
using a different architecture from the one used by the Java
52-
implementation. It should be noted that each implementation could
53-
have been implemented in the other language. Figure
54-
\ref{fig:StSeriesClass} shows the class diagram of the Smalltalk
55-
implementation. Figure \ref{fig:JvSeriesClass} shows the class
56-
diagram of the Java implementation.
50+
Figure \ref{fig:StSeriesClass} shows the class diagram of the Smalltalk
51+
implementation.
5752

5853
\begin{figure}
5954
\centering\includegraphics[width=11cm]{Figures/SeriesClassDiagram}
6055
\caption{Smalltalk class diagram for infinite series and continued
6156
fractions}\label{fig:StSeriesClass}
6257
\end{figure}
63-
\begin{figure}
64-
\centering\includegraphics[width=11cm]{Figures/SeriesClassDiagramJ}
65-
\caption{Java class diagram for infinite series and continued
66-
fractions}\label{fig:JvSeriesClass}
67-
\end{figure}
6858

6959
The Smalltalk implementation uses two general-purpose classes to
7060
implement an infinite series and a continued fraction
7161
respectively. Each class then use a \patstyle{Strategy} pattern
7262
class \cite{GoF} to compute each term of the expansion.
7363

74-
The Java implementation uses two abstract classes to implement an
75-
infinite series and a continued fraction respectively. Each
76-
concrete implementation necessitates the creation of a concrete
77-
subclass.
78-
79-
In spite of the difference in architecture, the reader can verify
80-
on each class diagram that the number of classes needed for a
81-
concrete implementation is the same in each case.
82-
83-
An interesting exercise for the reader is to implement the
84-
architecture presented in Java in Smalltalk and {\it vice versa}.
85-
8664
\section{Infinite series}
8765
Many functions are defined with an infinite series, that is a sum
8866
of an infinite number of terms. The most well known example is the

Statistics.tex

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1125,30 +1125,30 @@ \section{Probability distributions}
11251125
used in this book. Other important distributions are presented in
11261126
appendix \ref{ch:distributions}.
11271127

1128-
\subsection{Probability distributions --- General implementation}
1128+
\subsection{Probability distributions --- Smalltalk implementation}
11291129
\marginpar{Figure \ref{fig:statisticsclasses} with the boxes {\bf
11301130
ProbabilityDensity} and {\bf
11311131
ProbabilityDensityWithUnknownDistribution} grayed.} Table
11321132
\ref{tb:distrgenimpl} shows the description of the public methods
1133-
of the implementations of both languages.
1133+
of the implementation.
11341134
\begin{table}[h]
11351135
\centering
11361136
\caption{Public methods for probability density functions}
11371137
\label{tb:distrgenimpl}
11381138
\vspace{1 ex}
1139-
\begin{tabular}{|l | l | l|} \hline
1140-
Description & \hfil Smalltalk & \hfil Java \\ \hline
1141-
$P\left(x\right)$ & {\tt value:} & {\tt value(double)} \\
1142-
$F\left(x\right)$ & {\tt distributionValue:} & {\tt distributionValue(double)} \\
1143-
$F\left(x_1,x_2\right)$ & {\tt acceptanceBetween:and:} & {\tt distributionValue(double,double)} \\
1144-
$F^{-1}\left(x\right)$ & {\tt inverseDistributionValue:} & {\tt inverseDistributionValue(double)} \\
1145-
$x^{\dag}$ & {\tt random} & {\tt random()} \\
1139+
\begin{tabular}{|l | l |} \hline
1140+
Description & \hfil Smalltalk \\ \hline
1141+
$P\left(x\right)$ & {\tt value:} \\
1142+
$F\left(x\right)$ & {\tt distributionValue:} \\
1143+
$F\left(x_1,x_2\right)$ & {\tt acceptanceBetween:and:} \\
1144+
$F^{-1}\left(x\right)$ & {\tt inverseDistributionValue:} \\
1145+
$x^{\dag}$ & {\tt random} \\
11461146
\hline
1147-
$\bar{x}$ & {\tt average} & {\tt average()} \\
1148-
$\sigma^2$ & {\tt variance} & {\tt variance()} \\
1149-
$\sigma$ & {\tt standardDeviation} & {\tt standardDeviation()} \\
1150-
skewness & {\tt skewness} & {\tt skewness()} \\
1151-
kurtosis & {\tt kurtosis} & {\tt kurtosis()} \\
1147+
$\bar{x}$ & {\tt average} \\
1148+
$\sigma^2$ & {\tt variance} \\
1149+
$\sigma$ & {\tt standardDeviation} \\
1150+
skewness & {\tt skewness} \\
1151+
kurtosis & {\tt kurtosis} \\
11521152
\hline
11531153
\end{tabular}
11541154
$\dag$ $x$ represents the random variable itself. In other words,
@@ -1174,7 +1174,6 @@ \subsection{Probability distributions --- General implementation}
11741174
must be provided to create a function (as defined in section
11751175
\ref{sec:function}) for the distribution function.
11761176

1177-
\subsection{Probability distributions --- Smalltalk implementation}
11781177
Listing \ref{ls:probdistr} shows the implementation of a general
11791178
probability density distribution in Smalltalk. The class {\tt
11801179
DhbProbabilityDensity} is an abstract implementation. Concrete

0 commit comments

Comments
 (0)