SSJ API Documentation
Stochastic Simulation in Java
Loading...
Searching...
No Matches
OrdinaryLatticeSearch.java
1/*
2 * Class: OrdinaryLatticeSearch
3 * Description:
4 * Environment: Java
5 * Software: SSJ
6 * Copyright (C) 2018 Pierre L'Ecuyer and Universite de Montreal
7 * Organization: DIRO, Universite de Montreal
8 * @author Maxime Godin and Pierre Marion
9 * @since August 2018
10 *
11 *
12 * Licensed under the Apache License, Version 2.0 (the "License");
13 * you may not use this file except in compliance with the License.
14 * You may obtain a copy of the License at
15 *
16 * http://www.apache.org/licenses/LICENSE-2.0
17 *
18 * Unless required by applicable law or agreed to in writing, software
19 * distributed under the License is distributed on an "AS IS" BASIS,
20 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21 * See the License for the specific language governing permissions and
22 * limitations under the License.
23 *
24 */
25
26package umontreal.ssj.latnetbuilder;
27
28import umontreal.ssj.hups.Rank1Lattice;
29
30import java.util.ArrayList;
31
36public class OrdinaryLatticeSearch extends Search {
37
41 @Override
42 public Rank1Lattice search() throws RuntimeException {
43 ArrayList<String> res = executeCommandLine();
44 int numPoints = Integer.parseInt(res.get(1).split(" //")[0]);
45 int dimension = Integer.parseInt(res.get(2).split(" //")[0]);
46 int[] genVec = new int[dimension];
47 for (int coord = 0; coord < dimension; ++coord) {
48 genVec[coord] = Integer.parseInt(res.get(5 + coord).split(" //")[0]);
49 }
50 this.merit = Double.parseDouble(res.get(5 + dimension).split(" //")[0]);
51 this.time = Double.parseDouble(res.get(6 + dimension).split(" //")[0]);
52 this.successful = true;
53 return new Rank1Lattice(numPoints, genVec, dimension);
54 }
55
59 @Override
60 public String pointSetType() {
61 return "lattice";
62 }
63
67 @Override
68 public String interlacing() {
69 return "1";
70 }
71
75 @Override
76 public String construction() {
77 return "ordinary";
78 }
79}
This class implements point sets specified by integration lattices of rank 1.
Class for the search of good rank-1 ordinary lattice rules using LatNet Builder.
String pointSetType()
Returns the type of the searched point set.
Rank1Lattice search()
Executes the search and returns the corresponding point set.
String interlacing()
Returns the interlacing factor of the search.
ArrayList< String > executeCommandLine()
Executes the command-line and reads the content of the outputMachine.txt file.
Definition Search.java:139