public class ExampleSlice extends Object
The example computes the following slice on a 101x101 sample:
(x,y) |-> thetaSum( (x+iy,0) |B)
.
package de.jtem.riemann.theta;
import de.jtem.mfc.field.Field;
import de.jtem.blas.ComplexVector;
import de.jtem.blas.ComplexMatrix;
public class ExampleSlice {
public static void main( String [] argv ) {
Field.Complex factor = new Field.Complex();
Field.Complex sum = new Field.Complex();
// create the period matrix
ComplexMatrix B = new ComplexMatrix( 2 );
// set the period matrix
B.set( 0,0, 1.690983006, 0.9510565162 );
B.set( 0,1, 1.500000000, 0.3632712640 );
B.set( 1,0, 1.500000000, 0.3632712640 );
B.set( 1,1, 1.309016994, 0.9510565162 );
// use the different normalization
B.assignTimes( new Field.Complex( 0, 2 * Math.PI ) );
// create a complex argument vector
ComplexVector V = new ComplexVector( 2 );
// create a theta function instance with period matrix
Theta theta = new Theta( B, 0.0001 );
// create storage for the slice
Field.Complex[][] slice = new Field.Complex[101][101];
// create dummy variable for the factor
Field.Complex factor = new Field.Complex();
// loop over grid
for( int i=0; i<101; i++ )
for( int j=0; j<101; j++ ) {
// set grid vector
V.set( 0, 2 * i * Math.PI / 100, 2 * j * Math.PI / 100 );
// evaluate theta function at grid vector
theta.theta( V, factor, slice[i][j] );
}
}
}
Theta| Constructor and Description |
|---|
ExampleSlice() |
public static void main(String[] argv)