1. A method of lane assignment in a vehicle, comprising the steps of: providing, by an electronic control unit of the vehicle, one or more trajectories, wherein each trajectory represents a time sequence of positions of a moving object; selecting, by the electronic control unit of the vehicle, one first object from the one or more moving objects and the vehicle, wherein a first lane assignment indicates a lane to which the first object is assigned; selecting, by the electronic control unit of the vehicle, one second object from the one or more moving objects; determining, by the electronic control unit of the vehicle, a distance between a current position of the first object and the trajectory of the second object; comparing, by the electronic control unit of the vehicle, the distance with a predefined threshold; providing, based on the first lane assignment and a result of the comparison, and by the electronic control unit of the vehicle, a second lane assignment indicating a lane to which the second object is assigned; building, by the electronic control unit of the vehicle, a relation graph representing relations between pairs of moving objects, including determining trajectories which have to be considered for building the relation graph, wherein a trajectory of a second object has to be considered if a distance between this trajectory and the trajectory of a first object is below a pre-determined threshold, and a relation between the first and the second object is defined if the trajectory has to be considered; and propagating, by the electronic control unit of the vehicle, lane assignments along the determined relation graph, including determining distances (d-1, d-2, d-3) between pairs of moving objects having a relation with each other, and inferring lane assignments for the moving objects by assigning a lane to a second object of a pair of moving objects according to a lane assignment for the first object of the pair of moving objects and the determined distance for that pair of moving objects.