(self, includeSubPaths=True, weighted=True, mode="OUT")
return degrees
Returns the (weighted) degrees of nodes in the higher-order network

        @param weighted: If true, calculates the sum of weights for each node. If false, the 
            number of links is calculated

        @param mode: either "IN", "OUT", or "TOTAL"
Returns the (weighted) degrees of nodes in the higher-order network
Returns the ( weighted ) degrees of nodes in the higher - order network
def degrees(self, includeSubPaths=True, weighted=True, mode="OUT"):
        """
        Returns the (weighted) degrees of nodes in the higher-order network

        @param weighted: If true, calculates the sum of weights for each node. If false, the 
            number of links is calculated

        @param mode: either "IN", "OUT", or "TOTAL" 
        """
        degrees = [0]*self.vcount()
        for v in self.nodes:
            for u,w in self.edges:
                if (mode == "OUT" and u == v) or (mode == "IN" and w == v) or (mode == "TOTAL" and (u==v or w==v)):
                    if weighted:
                        if includeSubPaths:
                            degrees[self.nodes.index(v)] += self.edges[(u,w)].sum()
                        else: 
                            degrees[self.nodes.index(v)] += self.edges[(u,w)][1]
                    else:
                        if includeSubPaths:
                            degrees[self.nodes.index(v)] += 1
                        else: 
                            if self.edges[(u,w)][1]>0:
                                degrees[self.nodes.index(v)] += 1
        return degrees
def degrees ( self , includeSubPaths = True , weighted = True , mode = "OUT" ) : degrees = [ 0 ] * self . vcount ( ) for v in self . nodes : for u , w in self . edges : if ( mode == "OUT" and u == v ) or ( mode == "IN" and w == v ) or ( mode == "TOTAL" and ( u == v or w == v ) ) : if weighted : if includeSubPaths : degrees [ self . nodes . index ( v ) ] += self . edges [ ( u , w ) ] . sum ( ) else : degrees [ self . nodes . index ( v ) ] += self . edges [ ( u , w ) ] [ 1 ] else : if includeSubPaths : degrees [ self . nodes . index ( v ) ] += 1 else : if self . edges [ ( u , w ) ] [ 1 ] > 0 : degrees [ self . nodes . index ( v ) ] += 1 return degrees