package io2;
import tool.*;
public class catchdata{
double[][] a=new double[300][300];
double[] y=new double[300];
double[][] beta=new double[300][300];
double[] c=new double[300];
double[] im=new double[300];
double[] ex=new double[300];
double[] imx=new double[300];
double[][] inp=new double[300][300];
int number;
String[] data=new String[50000];
int s,sx,datanumber,tx;
String[] code_index=new String[50000];
String[] code_credit=new String[50000];
String[] index=new String[50000];
String[] credit=new String[50000];
double[] v=new double[30000];
int number_index,number_credit;
String[] dic_index=new String[500];
String[] dic_credit=new String[500];
String[] name_index=new String[500];
String[] name_credit=new String[500];
double[] w=new double[300];
double[] de=new double[300];
double[] tax=new double[300];
void makedata(){
readfile sub7=new readfile();
sub7.makedata("ren.txt", "UTF-8");
data=sub7.data;
datanumber=sub7.datanumber;
String str;
for(s=1;s<datanumber+1;s++){
catchword sub8=new catchword();
code_index[s]=sub8.makedata(data[s],"code_index");
code_credit[s]=sub8.makedata(data[s],"code_credit");
index[s]=sub8.makedata(data[s],"index");
credit[s]=sub8.makedata(data[s],"credit");
str=sub8.makedata(data[s],"value");
v[s]=Double.parseDouble(str);
}
for(s=1;s<datanumber+1;s++){
code_index[s]=code_index[s].replace(" ","");
code_credit[s]=code_credit[s].replace(" ","");
}
number_index=0;
number_credit=0;
int h;
for(s=1;s<datanumber+1;s++){
h=0;
for(sx=1;sx<number_index+1;sx++){
if(code_index[s].equals(dic_index[sx]))h=100;
}
if(h<50)number_index=number_index+1;
if(h<50)dic_index[number_index]=code_index[s];
if(h<50)name_index[number_index]=index[s];
}
for(s=1;s<number_index+1;s++){
System.out.println(s+","+name_index[s]);
}
for(s=1;s<datanumber+1;s++){
h=0;
for(sx=1;sx<number_credit+1;sx++){
if(code_credit[s].equals(dic_credit[sx]))h=100;
}
if(h<50)number_credit=number_credit+1;
if(h<50)dic_credit[number_credit]=code_credit[s];
if(h<50)name_credit[number_credit]=credit[s];
}
for(s=1;s<number_credit+1;s++){
System.out.println(s+","+name_credit[s]);
}
for(s=1;s<26;s++){
for(sx=1;sx<26;sx++){
for(tx=1;tx<datanumber+1;tx++){
h=0;
if(code_index[tx].equals(dic_index[s]))h=h+1;
if(code_credit[tx].equals(dic_credit[sx]))h=h+1;
if(h==2)a[s][sx]=v[tx];
}}}
for(s=1;s<26;s++){
for(tx=1;tx<datanumber+1;tx++){
h=0;
if(code_index[tx].equals(dic_index[32]))h=h+1;
if(code_credit[tx].equals(dic_credit[s]))h=h+1;
if(h==2)y[s]=v[tx];
}}
for(s=1;s<26;s++){
for(tx=1;tx<datanumber+1;tx++){
h=0;
if(code_index[tx].equals(dic_index[29]))h=h+1;
if(code_credit[tx].equals(dic_credit[s]))h=h+1;
if(h==2)w[s]=v[tx];
}}
for(s=1;s<26;s++){
for(tx=1;tx<datanumber+1;tx++){
h=0;
if(code_index[tx].equals(dic_index[27]))h=h+1;
if(code_credit[tx].equals(dic_credit[s]))h=h+1;
if(h==2)de[s]=v[tx];
}}
for(s=1;s<26;s++){
for(tx=1;tx<datanumber+1;tx++){
h=0;
if(code_index[tx].equals(dic_index[28]))h=h+1;
if(code_credit[tx].equals(dic_credit[s]))h=h+1;
if(h==2)tax[s]=v[tx];
}}
for(s=1;s<26;s++){
for(tx=1;tx<datanumber+1;tx++){
h=0;
if(code_index[tx].equals(dic_index[s]))h=h+1;
if(code_credit[tx].equals(dic_credit[34]))h=h+1;
if(h==2)ex[s]=v[tx];
}}
for(s=1;s<26;s++){
for(tx=1;tx<datanumber+1;tx++){
h=0;
if(code_index[tx].equals(dic_index[s]))h=h+1;
if(code_credit[tx].equals(dic_credit[35]))h=h+1;
if(h==2)im[s]=-v[tx];
}}
number=25;
}}
最終更新:2015年03月07日 12:29