1

我想创建一个名为neighborhood的元组数据结构,但是出现错误“(和[预期”),并且我添加()或[]之后仍然错误,您能帮帮我吗?

这里是源代码

protected Tuple<Map<DTNHost, Set<DTNHost>>,ArrayList<Double>> neighborhood;


protected SimBetRouterWithFairRouting(SimBetRouterWithFairRouting proto) {      

    neighboursNode = new HashMap<DTNHost, Set<DTNHost>>();
    indirectNode= new ArrayList<DTNHost>();
    directNode= new ArrayList<DTNHost>();
    this.rLambda = proto.rLambda;
    this.rSigma = proto.rSigma;
    this.a = proto.a;
    this.centrality = proto.centrality.replicate();
    this.similarity = proto.similarity.replicate();
    neighborsHistory = new HashMap<DTNHost, ArrayList<Double>>();

//这里是错误

neighborhood = new Tuple<HashMap<DTNHost, Set<DTNHost>>, ArrayList<Double>>;
}
4

0 回答 0