I waited about 4 weeks. You really want to make sure all your incisions are well healed as introducing an infection would NOT be a good idea. Plus, I know most pools have rules about swimming with "open sores". I think recent incisions count.
My personal opinion (and this is what was recommended to me by my team) was to focus on walking for the first little while. After one week post op I was up to 5 Km/day but it took me a lot longer then than it does to do the same walk now at 3 1/2 months post op. Don't push yourself too quickly. My centre was reluctant to have me "work-out" until 4 weeks post op. Now I'm swimming and biking and hiking and even doing a little running. Go at it slowly and before you know it you'll be exercising more than you ever imagined.