org.kth.dks.util
Class MathMisc

java.lang.Object
  extended by org.kth.dks.util.MathMisc

public class MathMisc
extends java.lang.Object


Constructor Summary
MathMisc()
           
 
Method Summary
static boolean belongsTo(long id, long start, long end, long n)
           
static boolean belongsToI(long id, long start, long end, long n)
           
static boolean belongsToII(long id, long start, long end, long n)
           
static boolean belongsTonn(long id, long start, long end, long n)
           
static long distanceAntiClockWise(long from, long to, long n)
           
static long distanceClockWise(long from, long to, long n)
           
static long modMinus(long x, long y, long n)
           
static long modPlus(long x, long y, long n)
           
static long nThroughKPowerL(long n, int k, int l)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MathMisc

public MathMisc()
Method Detail

belongsTo

public static boolean belongsTo(long id,
                                long start,
                                long end,
                                long n)

belongsTonn

public static boolean belongsTonn(long id,
                                  long start,
                                  long end,
                                  long n)

belongsToI

public static boolean belongsToI(long id,
                                 long start,
                                 long end,
                                 long n)

belongsToII

public static boolean belongsToII(long id,
                                  long start,
                                  long end,
                                  long n)

distanceClockWise

public static long distanceClockWise(long from,
                                     long to,
                                     long n)

distanceAntiClockWise

public static long distanceAntiClockWise(long from,
                                         long to,
                                         long n)

modPlus

public static long modPlus(long x,
                           long y,
                           long n)

modMinus

public static long modMinus(long x,
                            long y,
                            long n)

nThroughKPowerL

public static long nThroughKPowerL(long n,
                                   int k,
                                   int l)


Copyright © 2010. All Rights Reserved.