lm317 current source sense resistor
The principle behind this circuit is that the LM317 will work to make the voltage on the ADJ pin always be Vref (1.25V) less than the voltage on OUT pin. Therefore it acts as a current limiter. The sense resistor is sized to choose what current it is limited to.

For the voltage on ADJ to be 1.25V less than OUT, the following must be true:
$$V_{out} - I*R = 1.25$$
where I is the current through the resistor and R is the 1.25 Ohm resistor. Rearranging and solving for Vout,
$$V_{out} = 1.25*(1+I).$$

Let's take the two extreme cases as examples and look at the current in the circuit.

Case 1
The circuit is open exactly as shown in the graphic. In this case, the only load on the circuit is the LED and accompanying resistor. Starting from the OUT pin and assuming the Vf of the LED is 1.2V:

$$V_{out}-1.25*I-1.2V-100*I=0$$
$$I = 0.5mA$$
$$V_{out} = 1.25*(1+0.5mA) = 1.250625V$$

Case 2
The output nodes are shorted together. In this case, we can ignore the LED and its resistor because its current will be negligible. The voltage across the resistor is regulated by the LM317 to be 1.25V less than the OUT pin. Since the output is shorted, it will try to pull as much current as it can. Using Ohm's Law:
$$1.25V = I * (1.25 Ohm)$$
$$I = 1.25V/(1.25 Ohm) = 1A$$
$$Vout = 1.25 * (1+1A) = 2.5V$$
In other words, the LM317 will regulate the voltage on the OUT pin to keep the current to exactly 1A if the circuit is trying to pull more than 1A.