Questions tagged [bidirectional]

"Bidirectional" refers to any process or structure that works in two directions. Use the tag `bidi` for bidirectional text instead of this tag.

"Bidirectional" is a general concept and can have a lot of meanings:

  • bidirectional text, see
  • bidirectional associations of data
  • bidirectional synchronization
  • bidirectional mapping
  • bidirectional communication
  • bidirectional search algorithms

See also: https://en.wikipedia.org/wiki/Bidirectional

493 questions
3
votes
1 answer

Time Complexity - Bidirectional Dijkstra

I want to know the time-complexity of a bidirectional Dijkstra algorithm. A normal Dijkstra using a Min-Heap has O(n log n + m). My guess would be that the Bidirectional stays same. However Wikipedia suggests that the improvement of Bidirectional…
Denis Lukenich
  • 3,084
  • 1
  • 20
  • 38
3
votes
2 answers

Best way to handle a Bidirectional Association in OOP

I would like to know the best way to handle a Bi-Directional association in O.O.P. I have found multiple solutions on Google and SO but each and every one of them seems to have a drawback. The language is irrelevant but let's use PHP to illustrate…
d08z
  • 73
  • 6
3
votes
1 answer

Implementing Bidirectional A* Shortest Path Algorithm

I am implementing a symmetric bidirectional A* shortest path algorithm, as mentioned in [Goldberg and Harrelson,2005]. This is only for understanding the algorithm, therefore I used the most basic version without any optimization steps. My problem…
yang
  • 117
  • 1
  • 2
  • 7
3
votes
4 answers

How to put a limit on the amount of objects in an ArrayList

I'm just doing some revision for my O.O.P. Exam coming up next week and I'm stuck on a question. The question is basically give an example of bi-directional association between a Dog and a Flea. So far I've got a Dog with Fleas. The part I'm stuck…
Jaywin
  • 65
  • 3
3
votes
1 answer

Extend NSMutableArray for bi-directional association management

I am a great fan of code generation (from UML) and coming from the Java world, I wonder how I would implement automated bi-directional association management in Objective-C. Image an association Partner <-> Address, one-to-many and navigable from…
André Pareis
  • 1,084
  • 8
  • 17
3
votes
3 answers

OneToOne bidirectional mapping foreign key auto fill

I have a relationship one-to-one between two tables, but the foreign key is on the one I don't need to map, the DBA did this in favor of future changes. Let's imagine we have User and Address, today every user has only one address, and it will be…
Tiago Pimenta
  • 736
  • 7
  • 20
3
votes
1 answer

How to make a bi-directional RecyclerView?

I need to be able to make a bi-directional RecyclerView. Basically, it would scroll vertically, but each row would be a horizontal list of tiles that could scroll. The initial scroll position would be at the top and left. The user could scroll down,…
afollestad
  • 2,929
  • 5
  • 30
  • 44
3
votes
1 answer

mongoengine bi-directional reference how?

Given the following Code: from mongoengine import * connect('spike_bidirectional') class User(Document): name = StringField() page = ListField(ReferenceField('Page')) class Page(Document): content = StringField() user =…
Thomas Spycher
  • 956
  • 13
  • 32
3
votes
1 answer

Is there a bidirectional map in matlab?

Is there a bidirectional map data structure in matlab that is more efficient than using containers.Map's keys and values in an opposite direction? Also what is the most efficient way to use ordinary maps for this purpose?
Dandelion
  • 744
  • 2
  • 13
  • 34
3
votes
2 answers

Does Knockout support bi-directional binding to styles?

For example, I want to bind a property in the viewmodel to an height of an element so if its height get changed it updates the property. I read this example but it shows only one direction…
Ronen Festinger
  • 2,260
  • 1
  • 23
  • 32
3
votes
1 answer

Does SFTP need Bi-Directional access

I have following script to get given file from given remote directory by accepting following parameters Host Name that you are connecting to get File User Name of the Host Local Directory where you wanted to transfer file Remote Directory from…
user863952
  • 103
  • 2
  • 5
  • 15
3
votes
0 answers

Is Bi-direction RPC in Apache Avro Possible?

Is it possible to do bi-directional (P2P) messaging in Apache Avro over a single connection? Eg, if I defined a protocol in Avro with one method PING, is it possible for the PING request to be made by both clients without establishing a second…
imacg
  • 31
  • 1
3
votes
1 answer

Specifying a bidirectional relationship in Hibernate between objects of the same class

I have a class City where some City objects will have a many-to-many relationship with other City objects. This relationship is a sister city relationship where, for example, the City object Tokyo can have a sister city relationship with the City…
3
votes
1 answer

JPA 2.0 / Hibernate - why hibernate issue select count (*) query before delete

I am using spring-data with hibernate. I have a bidirectional mapping as follow: public class Student { ... @OneToMany(fetch = FetchType.EAGER, cascade = CascadeType.ALL, orphanRemoval = true, mappedBy="student") private List
brnzn
  • 175
  • 1
  • 1
  • 5
3
votes
0 answers

Doctrine2: How to keep custom join table synchronized in a bi-directional Many-to-Many association?

The statement I'm trying to reproduce the automatic Doctrine mechanism for handling Many-to-Many bidrectional relationships, but introducing a custom join table. I've already digged into similar questions: Joining-Table with Metadata Impairs…
Ninj
  • 1,492
  • 1
  • 15
  • 27