Navigation Menu

Skip to content

Commit

Permalink
add two more c# examples translated by daniel
Browse files Browse the repository at this point in the history
  • Loading branch information
Soeren Sonnenburg committed Sep 26, 2011
1 parent 0cadbbd commit 32b654e
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
20 changes: 20 additions & 0 deletions examples/undocumented/csharp_modular/features_snp_modular.cs
@@ -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();

}
}
@@ -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();
}
}

0 comments on commit 32b654e

Please sign in to comment.