Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add two more c# examples translated by daniel
- Loading branch information
Soeren Sonnenburg
committed
Sep 26, 2011
1 parent
0cadbbd
commit 32b654e
Showing
2 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
examples/undocumented/csharp_modular/features_snp_modular.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
//import org.shogun.*; | ||
//import org.jblas.*; | ||
//import static org.shogun.EAlphabet.SNP; | ||
//import java.util.ArrayList; | ||
//import java.util.Arrays; | ||
//import java.util.List; | ||
|
||
public class features_snp_modular { | ||
public static void Main() { | ||
|
||
modshogun.init_shogun_with_defaults(); | ||
string filename = "../data/snps.dat"; | ||
StringByteFeatures sf = new StringByteFeatures(EAlphabet.SNP); | ||
sf.load_ascii_file(filename, false, EAlphabet.SNP, EAlphabet.SNP); | ||
SNPFeatures snps = new SNPFeatures(sf); | ||
|
||
modshogun.exit_shogun(); | ||
|
||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
examples/undocumented/csharp_modular/features_string_hashed_wd_modular.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using System; | ||
|
||
public class features_string_hashed_wd_modular { | ||
public static void Main() { | ||
modshogun.init_shogun_with_defaults(); | ||
int order = 3; | ||
int start_order = 1; | ||
int hash_bits = 2; | ||
|
||
int from_order = order; | ||
StringByteFeatures f = new StringByteFeatures(EAlphabet.RAWDNA); | ||
HashedWDFeatures y = new HashedWDFeatures(f,start_order,order,from_order,hash_bits); | ||
|
||
modshogun.exit_shogun(); | ||
} | ||
} |