private Graph<TypedVerTex, DefaultEdge> generateGraph(Tuple<double[][], String[][]> params) throws UserError {
		double[][] data1=params.getKey();
		//String [][]data2=params.getValue();

		int noTypes=(int)data1[0][0];
		int noNoRels=(int)data1[0][1];

		//------------
		BuildHeteGraph x=new BuildHeteGraph();

		//get all types port
		for (int i = 1; i <= noTypes; i++) {
			ExampleSet exampleSet=exset[i];
			String vertexType=exampleSet.getSource().replace("Retrieve ", "").trim();
			x.addVertex(exampleSet,ObjectTypeOfGraph.VERTEX,vertexType);
		}

		//get All relation ports
		for (int i = noTypes+1; i <= noTypes+noNoRels; i++) {
			ExampleSet exampleSet=exset[i];
			String vertexType=exampleSet.getSource().replace("Retrieve ", "").trim();
			System.out.println("---reading relation exampleset "+vertexType);
			//split to types
			String []ss=vertexType.split("_");
			String fromType=ss[0];
			String toType=ss[1];
			//navigate through data set
			Iterator<Example> itor = exampleSet.iterator();
			while(itor.hasNext()){
				Example ex = itor.next();
				Attributes atts = ex.getAttributes();
				Iterator<Attribute> it = atts.iterator();
				Attribute from=it.next();
				Attribute to=it.next();
				String fromVal=ex.getValueAsString(from);
				String toVal=ex.getValueAsString(to);
				TypedVerTex v1 = x.findVertex(fromVal, fromType);
				TypedVerTex v2 = x.findVertex(toVal, toType);
				System.out.print("<"+v1+"-->"+v2+">;");
				if(v1!=null && v2!=null){
					//create state vertex and add to graph
					TypedVerTex state=new TypedVerTex("state", ex);
					x.addVertex(state);
					//add edge from v1->state
					x.addEdge(v1, state);
					//add edge from v2->state
					x.addEdge(v2, state);///state-->v2????
				}
			}
			System.out.println();
		}
		return x.getGraph();
	}