pub fn is_regular(&self) -> bool {
		let mut from = 0;
		let mut n = 0;
		let mut prev_n = 0;
		for (i, link) in self.links.iter().enumerate() {
			if from != link.from {
				from = link.from;
				if i > 0 && prev_n != n {
					return false;
				}
				prev_n = n;
			}
			n += 1;
		}
		true
	}
// Check if all nodes have the same degree
Check if all nodes have the same degree
Check if all nodes have the same degree
pub fn is_regular(&self) -> bool {
		let mut from = 0;
		let mut n = 0;
		let mut prev_n = 0;
		for (i, link) in self.links.iter().enumerate() {
			if from != link.from {
				from = link.from;
				if i > 0 && prev_n != n {
					return false;
				}
				prev_n = n;
			}
			n += 1;
		}
		true
	}
pub fn is_regular ( & self ) -> bool { let mut from = 0 ; let mut n = 0 ; let mut prev_n = 0 ; for ( i , link ) in self . links . iter ( ) . enumerate ( ) { if from != link . from { from = link . from ; if i > 0 && prev_n != n { return false ; } prev_n = n ; } n += 1 ; } true }
Check if all nodes have the same degree
Check if all nodes have the same degree
&self
&self