/Lamport-and-vector-clock

lamport vector clock code java

Primary LanguageJava

Lamport-and-vector-clock

A vector clock is an algorithm for generating a partial ordering of events in a distributed system and detecting causality violations. The algorithm of Lamport timestamps is a simple algorithm used to determine the order of events in a distributed computer system.

use class Points to add process with its size and no.

use class Lamp for lamport clock result and class vector for vector clock result.

first add points to lamp/vector class using addLamp()/add() function respectively. then use addto() function to evaluate the result.