Java Reference
In-Depth Information
}
this . sphere = new Atom ( center .x, center .y,
center .z , r) ;
public static boolean bump ( Atom a , Molecule b)
{
if (! Atom . bump (a, b. sphere ))
return false ;
for ( int i=0; i < b . atoms .
length
; ++i )
if ( Atom . bump (a , b . atoms [ i ] ) )
return true ;
return false ;
public static boolean bump ( Molecule a , Molecule b)
{
if (! Atom . bump (a. sphere
, b. sphere ))
return false ;
for ( int i=0; i < a . atoms .
length
; ++i )
if ( bump (a . atoms [ i ] , b) )
return true ;
return false ;
}
}
Solution 11.3 (Coding electrical signals)
We are interested in modeling binary electrical signals with values
ranging in
that only change a finite number of times. These
changes occur only at clock ticks. Thus these events can be modeled as
positive integers that encode the numbers of clock ticks since the starting
time (time origin).
{
false , true
}
Such a signal is defined by its initial value v 0 , and a sequence of strictly
increasing transition states τ 1 ,...,τ n N
.In]
−∞
1 [, the signal has
value v 0 .In[ τ 1 2 [, the signal takes value v 1 =
x denotes
the logical negate function of x , written as !x in Java). In [ τ 2 3 [, the
signal value is v 2 =
¬
v 0 (where
¬
¬
v 1 , and so on (with v n =
¬
v n− 1 in time range
[ τ n , +
[). A constant signal shall be represented by its value v 0 and an
empty sequence ( n = 0).
For example, the depicted signal corresponds to the initial value false
and the following sequence of transitions: τ 1 =1 2 =3 3 =4.
 
Search WWH ::




Custom Search