0_0_24044928_29363.cpp:1:1: error: 'import' does not name a type
import java.util.Scanner;
^
0_0_24044928_29363.cpp:4:10: error: expected ':' before 'int'
private int n,m; // n为左侧节点数,m为右侧节点数
^
0_0_24044928_29363.cpp:5:10: error: expected ':' before 'int'
private int[] cand; //右侧节点暂时匹配的候选点id
^
0_0_24044928_29363.cpp:5:13: error: expected unqualified-id before '[' token
private int[] cand; //右侧节点暂时匹配的候选点id
^
0_0_24044928_29363.cpp:6:10: error: expected ':' before 'double'
private double[] lx; //左侧节点顶标
^
0_0_24044928_29363.cpp:6:16: error: expected unqualified-id before '[' token
private double[] lx; //左侧节点顶标
^
0_0_24044928_29363.cpp:7:10: error: expected ':' before 'double'
private double[] ly; //右侧节点顶标
^
0_0_24044928_29363.cpp:7:16: error: expected unqualified-id before '[' token
private double[] ly; //右侧节点顶标
^
0_0_24044928_29363.cpp:8:10: error: expected ':' before 'double'
private double[] slack; //松弛量
^
0_0_24044928_29363.cpp:8:16: error: expected unqualified-id before '[' token
private double[] slack; //松弛量
^
0_0_24044928_29363.cpp:9:10: error: expected ':' before 'boolean'
private boolean[] visx; //左侧节点匹配标记
^
0_0_24044928_29363.cpp:9:10: error: 'boolean' does not name a type
0_0_24044928_29363.cpp:10:10: error: expected ':' before 'boolean'
private boolean[] visy; //右侧节点匹配标记
^
0_0_24044928_29363.cpp:10:10: error: 'boolean' does not name a type
0_0_24044928_29363.cpp:11:10: error: expected ':' before 'double'
private double[][] w; //匹配权重,w[i][j]为左侧节点i匹配右侧节点j的权重值
^
0_0_24044928_29363.cpp:11:16: error: expected unqualified-id before '[' token
private double[][] w; //匹配权重,w[i][j]为左侧节点i匹配右侧节点j的权重值
^
0_0_24044928_29363.cpp:12:10: error: expected ':' before 'double'
private double eps = 1e-16; //距0精度误差
^
0_0_24044928_29363.cpp:14:9: error: expected ':' before 'int'
public int[] link; //左侧节点匹配的右节点编号
^
0_0_24044928_29363.cpp:14:12: error: expected unqualified-id before '[' token
public int[] link; //左侧节点匹配的右节点编号
^
0_0_24044928_29363.cpp:15:9: error: expected ':' before 'double'
public double weightSum; //最优匹配权重和
^
0_0_24044928_29363.cpp:17:10: error: expected ':' before 'boolean'
private boolean DFS(int x) {
^
0_0_24044928_29363.cpp:17:10: error: 'boolean' does not name a type
0_0_24044928_29363.cpp:36:10: error: expected ':' before 'double'
private double KM() {
^
0_0_24044928_29363.cpp:99:9: error: expected ':' before 'double'
public double getBestMatch(int n,int m, double[][] weight) {
^
0_0_24044928_29363.cpp:99:51: error: multidimensional array must have bounds for all dimensions except the first
public double getBestMatch(int n,int m, double[][] weight) {
^
0_0_24044928_29363.cpp:99:53: error: expected ',' or '...' before 'weight'
public double getBestMatch(int n,int m, double[][] weight) {
^
0_0_24044928_29363.cpp:113:1: error: expected ';' after class definition
}
^
0_0_24044928_29363.cpp: In member function 'double BestMatch::KM()':
0_0_24044928_29363.cpp:39:3: error: 'cand' was not declared in this scope
cand = new int[m];
^
0_0_24044928_29363.cpp:40:3: error: 'lx' was not declared in this scope
lx = new double[n];
^
0_0_24044928_29363.cpp:41:3: error: 'ly' was not declared in this scope
ly = new double[m];
^
0_0_24044928_29363.cpp:42:3: error: 'slack' was not declared in this scope
slack = new double[m];
^
0_0_24044928_29363.cpp:43:3: error: 'visx' was not declared in this scope
visx = new boolean[n];
^
0_0_24044928_29363.cpp:43:14: error: 'boolean' does not name a type
visx = new boolean[n];
^
0_0_24044928_29363.cpp:44:3: error: 'visy' was not declared in this scope
visy = new boolean[m];
^
0_0_24044928_29363.cpp:44:14: error: 'boolean' does not name a type
visy = new boolean[m];
^
0_0_24044928_29363.cpp:51:10: error: 'w' was not declared in this scope
if (w[i][j] > lx[i])
^
0_0_24044928_29363.cpp:59:16: error: 'Double' was not declared in this scope
slack[j] = Double.MAX_VALUE;
^
0_0_24044928_29363.cpp:64:13: error: 'DFS' was not declared in this scope
if(DFS(i)) //若成功(找到了增广路),则该点增广完成,进入下一个点的增广
^
0_0_24044928_29363.cpp:67:16: error: 'Double' was not declared in this scope
double d = Double.MAX_VALUE;
^
0_0_24044928_29363.cpp:87:3: error: 'link' was not declared in this scope
link = new int[n];
^
0_0_24044928_29363.cpp:92:16: error: 'w' was not declared in this scope
weightSum+=w[cand[i]][i];
^
0_0_24044928_29363.cpp: In member function 'double BestMatch::getBestMatch(int, int)':
0_0_24044928_29363.cpp:101:8: error: request for member 'n' in '(BestMatch*)this', which is of pointer type 'BestMatch*' (maybe you meant to use '->' ?)
this.n = n;
^
0_0_24044928_29363.cpp:102:8: error: request for member 'm' in '(BestMatch*)this', which is of pointer type 'BestMatch*' (maybe you meant to use '->' ?)
this.m = m;
^
0_0_24044928_29363.cpp:103:8: error: request for member 'w' in '(BestMatch*)this', which is of pointer type 'BestMatch*' (maybe you meant to use '->' ?)
this.w = weight;
^
0_0_24044928_29363.cpp:103:12: error: 'weight' was not declared in this scope
this.w = weight;
^
0_0_24044928_29363.cpp: At global scope:
0_0_24044928_29363.cpp:114:1: error: expected unqualified-id before 'public'
public class Main {
^
|