我想创建一个称为邻域的元组数据结构,但是出现错误“(和[预期”,并且在我添加()或[]仍然是错误之后,您能帮我吗?
此处是源代码
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>>;
}