File: Quad64.java

package info (click to toggle)
bbmap 38.90%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 21,520 kB
  • sloc: java: 265,882; sh: 14,954; python: 5,247; ansic: 2,074; perl: 96; xml: 38; makefile: 37
file content (37 lines) | stat: -rwxr-xr-x 743 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package align2;

public class Quad64 implements Comparable<Quad64>{
	
	public Quad64(int col_, int row_, int val_){
		column=col_;
		row=row_;
		site=val_;
	}
	
	@Override
	public boolean equals(Object other){
		assert(false);
		return site==((Quad64)other).site;
	}
	
	@Override
	public int hashCode(){return (int)site;}
	
	@Override
	public int compareTo(Quad64 other) {
		return site>other.site ? 1 : site<other.site ? -1 : column-other.column;
//		int x=site-other.site;
//		return(x>0 ? 1 : x<0 ? -1 : column-other.column);
	}
	
	@Override
	public String toString(){
		return("("+column+","+row+","+site+")");
	}
	
	public final int column;
	public int row;
	public long site;
	public int list[];
	
}