Skip to main content
Rollback to Revision 2
Source Link
RoToRa
  • 11.6k
  • 1
  • 24
  • 51

I have this method that returns true if attribute is already used and false otherwise:

public boolean alreadNodealreadyUsed(Node node, int attribute) 
{
    if (node.parent == null) 
    {
        return false;
    }
    
    if (node.children != null) 
    {
        if (node.splitAttribute == attribute )
        {
            return true;
        }
    e}
    return alreadyUsed(node.parent, attribute);
}

Can this be written in a more understandable way?

I have this method that returns true if attribute is already used and false otherwise:

public boolean alreadNode node, int attribute) 
{

        }
    }
    e);
}

Can this be written in a more understandable way?

I have this method that returns true if attribute is already used and false otherwise:

public boolean alreadyUsed(Node node, int attribute) 
{
    if (node.parent == null) 
    {
        return false;
    }
    
    if (node.children != null) 
    {
        if (node.splitAttribute == attribute )
        {
            return true;
        }
    }
    return alreadyUsed(node.parent, attribute);
}

Can this be written in a more understandable way?

deleted 283 characters in body
Source Link

I have this method that returns true if attribute is already used and false otherwise:

public boolean alreadyUsed(NodealreadNode node, int attribute) 
{
    if (node.parent == null) 
    {
        return false;
    }
    
    if (node.children != null) 
    {
        if (node.splitAttribute == attribute )
        {
            return true;
        }
    }
    return alreadyUsed(node.parent, attributee);
}

Can this be written in a more understandable way?

I have this method that returns true if attribute is already used and false otherwise:

public boolean alreadyUsed(Node node, int attribute) 
{
    if (node.parent == null) 
    {
        return false;
    }
    
    if (node.children != null) 
    {
        if (node.splitAttribute == attribute )
        {
            return true;
        }
    }
    return alreadyUsed(node.parent, attribute);
}

Can this be written in a more understandable way?

I have this method that returns true if attribute is already used and false otherwise:

public boolean alreadNode node, int attribute) 
{

        }
    }
    e);
}

Can this be written in a more understandable way?

added 8 characters in body; edited title
Source Link
Jamal
  • 35.2k
  • 13
  • 134
  • 238

Tree parent and child nodes - Java

I have this method that gives truereturns true if attributeattribute is already used and falsefalse otherwise.:

public boolean alreadyUsed(Node node, int attribute) 
{
    if (node.parent == null) 
    {
        return false;
    }
    
    if (node.children != null) 
    {
        if (node.splitAttribute == attribute )
        {
            return true;
        }
    }
    return alreadyUsed(node.parent, attribute);
}

Can this be written in a more understandable way?

Tree parent and child nodes - Java

I have this method that gives true if attribute is already used and false otherwise.

public boolean alreadyUsed(Node node, int attribute) 
{
    if (node.parent == null) 
    {
        return false;
    }
    
    if (node.children != null) 
    {
        if (node.splitAttribute == attribute )
        {
            return true;
        }
    }
    return alreadyUsed(node.parent, attribute);
}

Can this be written in a more understandable way?

Tree parent and child nodes

I have this method that returns true if attribute is already used and false otherwise:

public boolean alreadyUsed(Node node, int attribute) 
{
    if (node.parent == null) 
    {
        return false;
    }
    
    if (node.children != null) 
    {
        if (node.splitAttribute == attribute )
        {
            return true;
        }
    }
    return alreadyUsed(node.parent, attribute);
}

Can this be written in a more understandable way?

Source Link
Loading