Roll up Parent Child Relationship

Hi all, 

I am making custom financial report. How do I check if an account is Rollup, Both, Member, or No as in COA Screen? Is there any function to display Parent-Child Relationship?

Thank you.